FHIR © HL7.org  |  Server Home  |  FHIR Server FHIR Server 3.7.16  |  FHIR Version n/a  User: [n/a]

Resource Measure/FHIR Server from package gov.healthit.ecqi.ecqms#current (422 ms)

Package gov.healthit.ecqi.ecqms
Type Measure
Id Id
FHIR Version R4
Source http://ecqi.healthit.gov/ecqms/https://build.fhir.org/ig/cqframework/ecqm-content-qicore-2024/Measure-CMS1218HHRFFHIR.html
Url https://madie.cms.gov/Measure/CMS1218HHRFFHIR
Version 0.0.003
Status active
Date 2025-01-14T15:54:07+00:00
Name CMS1218HHRFFHIR
Title Hospital Harm - Postoperative Respiratory FailureFHIR
Experimental False
Description This measure assesses the number of elective inpatient hospitalizations for patients aged 18 years and older without an obstetrical condition who have a procedure resulting in postoperative respiratory failure (PRF)
Purpose UNKNOWN
Copyright Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.

Resources that use this resource

No resources found


Resources that this resource uses

No resources found



Narrative

Note: links and images are rebased to the (stated) source

Title: Hospital Harm - Postoperative Respiratory FailureFHIR
Id: CMS1218HHRFFHIR
Version: 0.0.003
Url: Hospital Harm - Postoperative Respiratory FailureFHIR
Short Name Identifier:

CMS1218FHIR

Version Independent Identifier:

urn:uuid:b6857e46-6412-432d-abc8-0508efc0d2d7

Version Specific Identifier:

urn:uuid:447f5c0f-f39c-4a27-a0bc-d5ae918bef10

Endorser (CMS Consensus Based Entity) Identifier:

4130e

Publisher (CMS) Identifier:

1218FHIR

Effective Period: 2026-01-01..2026-12-31
Publisher: Centers for Medicare & Medicaid Services (CMS)
Author: Mathematica
Description:

This measure assesses the number of elective inpatient hospitalizations for patients aged 18 years and older without an obstetrical condition who have a procedure resulting in postoperative respiratory failure (PRF)

Purpose:

UNKNOWN

Copyright:

Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc.

This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.

Disclaimer:

This performance measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications.

THE MEASURES AND SPECIFICATIONS ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND.

Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].

Rationale:

Postoperative respiratory failure (PRF), defined as unplanned endotracheal reintubation, prolonged inability to wean from mechanical ventilation, or inadequate oxygenation and/or ventilation, is the most common serious postoperative pulmonary complication, with an incidence of up to 7.5% (the incidence of any postoperative pulmonary complication ranges from 10-40%) (Arozullah et al., 2000; Canet et al., 2015; Gupta et al., 2011; Kor et al., 2014). This measure addresses the prevalence of PRF and the variance between hospitals in the incidence of PRF. PRF is a serious complication that can increase the risk of morbidity and mortality, with in-hospital mortality resulting from PRF estimated at 25% to 40% (Arozullah et al., 2000; Canet & Gallart, 2014). Surgical procedures complicated by PRF have 3.74 times higher adjusted odds of death than those not complicated by respiratory failure, 1.47 times higher odds of 90-day readmission, and 1.86 times higher odds of an outpatient visit with one of 44 postoperative conditions (e.g., bacterial infection, fluid and electrolyte disorder, abdominal hernia) within 90 days of hospital discharge (Miller et al., 2001; Romano et al, 2009). PRF is additionally associated with prolonged mechanical ventilation and the need for rehabilitation or skilled nursing facility placement upon discharge (Thompson & Lisco, 2018).

The incidence of PRF varies by hospital, with higher reported rates of PRF in nonteaching hospitals than teaching hospitals (Rahman et al., 2013). Additionally, one study found that the odds of developing PRF increased by 6% for each level increase in hospital size from small to large (Rahman et al., 2013). This suggests that there remains room for improvement in hospitals reporting higher rates of PRF.

The most widely used current measures of PRF are based on either claims data (CMS Patient Safety Indicator (PSI) 11) or proprietary registry data (National Surgical Quality Improvement Program (NSQIP) of the American College of Surgeons). The eCQM is closely modeled after the NSQIP measure of PRF, which has been widely adopted across American hospitals, and is intended to complement and eventually supplant CMS PSI 11.

Clinical recommendation statement:

Recent studies and current clinical practice guidelines for PRF have identified enhanced recovery pathways, prophylactic mucolytics, postoperative continuous positive airway pressure ventilation, lung protective intraoperative ventilation, prophylactic respiratory physiotherapy, epidural analgesia, and goal directed hemodynamic therapy as evidence-based interventions to reduce the incidence of PRF. Yet, progress in reducing the incidence of PRF has been stymied by lack of consensus regarding the definition of PRF, which patients are most at-risk, which risk factors are potentially modifiable, and which patients are more likely to benefit from targeted interventions of a health care system’s limited resources. This measure would address this gap in data.

Relevant clinical guidelines for preventing postoperative respiratory failure can be found in the following:

  • Mohanty, et al. Optimal Perioperative Management of the Geriatric Patient: Best Practices Guideline from ACS NSQIP/AGS, 2016
  • Piraino, et al. AARC Clinical Practice Guideline: Management of Adult Patients with Oxygen in the Acute Care Setting, 2022
Guidance (Usage): PRF is evaluated using mechanical ventilation (MV) documentation or intubation and extubation documentation to allow for hospital documentation variances. Therefore, if MV documentation is not available, intubation and extubation can serve as a proxy for determining if MV occurred and its duration. To determine that an unplanned initiation of MV occurred, the logic looks for evidence of a non-invasive oxygen therapy assessment such as oxygen via 'nasal canula' or 'breathing room air' prior to the MV occurrence to verify that MV was newly initiated. Additionally, facility location codes are used to determine if MV was initiated outside of a procedural area (e.g., medical floor). Conversely, to determine MV duration, the logic looks for evidence that a non-invasive oxygen therapy assessment or another operating room procedure does not exist prior to the MV occurrence to verify that MV was continued without interruption from a procedural area. This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period. This FHIR-based measure has been derived from the QDM-based measure: CMS1218v2. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).
Population Criteria:
67520e47670f1c0879cef598
Initial Population: Elective inpatient hospitalizations with no preceding emergency department visit that end during the measurement period for patients aged 18 and older without an obstetrical condition and at least one surgical procedure was performed within the first 3 days of the encounter
Denominator: Equals Initial Population
Denominator Exclusion: Inpatient hospitalizations for patients: With a diagnosis for a degenerative neurological disorder With any selected head, neck, and thoracic surgery involving significant risk of airway compromise or requiring airway protection Who have mechanical ventilation that starts more than one hour prior to the start of the first operating room (OR) procedure With a diagnosis for a neuromuscular disorder With arterial partial pressure of carbon dioxide (PaCO2)>50 mmHg combined with an arterial pH<7.30 within 48 hours or less prior to the start of the first OR procedure With arterial partial pressure of oxygen (PaO2)<50 mmHg within 48 hours or less prior to the start of the first OR procedure With a principal diagnosis for acute respiratory failure With a diagnosis for acute respiratory failure present on admission With any diagnosis present on admission for the existence of a tracheostomy Where a tracheostomy is performed before or on the same day as the first OR procedure
Numerator: Elective inpatient hospitalizations for patients with postoperative respiratory failure as evidenced by any of the following: Criterion A: Mechanical ventilation (MV) initiated within 30 days after first OR procedure, as evidenced by: A.1. Intubation that occurs outside of a procedural area and within 30 days after the end of the/first OR procedure of the encounter. or A.2. MV that occurs outside of a procedural area within 30 days after the end of the first OR procedure of the encounter and is preceded by a period of non-invasive oxygen therapy between the end of the OR procedure and the MV occurrence, and without a subsequent OR procedure between the non-invasive oxygen therapy and the MV occurrence. or Criterion B: MV with a duration of more than 48 hours after the first OR procedure, as evidenced by: B.1. Extubation that occurs outside of a procedural area more than 48 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a period of non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the extubation occurrence. or B.2 Mechanical ventilation that occurs between 48 and 72 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the MV occurrence./
Libraries:
CMS1218HHRFFHIR
Terminology and Other Dependencies:
  • Library/FHIRHelpers|4.4.000
  • Library/CQMCommon|2.2.000
  • Library/QICoreCommon|2.1.000
  • Library/HospitalHarm|1.1.000
  • SNOMED CT (all versions)
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.85
  • Emergency Department Visit
  • Obstetrics
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208
  • Observation Services
  • Outpatient Surgery Service
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.179
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.255
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.216
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.107
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.209
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.213
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.241
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.251
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.239
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.95
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.96
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.94
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.88
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1147.197
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.89
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.181
  • Parameters:
    name use min max type
    Measurement Period In 0 1 Period
    Numerator Out 0 * Resource
    Denominator Out 0 * Resource
    Initial Population Out 0 * Resource
    Denominator Exclusions Out 0 * Resource
    DataRequirements:
    Resource Type Resource Elements Valueset Name Valueset
    Patient(QICorePatient)
    Encounter(QICoreEncounter) type period location location.type location.type.value id id.value diagnosis extension url url.value Emergency Department Visit Emergency Department Visit
    Encounter(QICoreEncounter) type period priority location location.type location.type.value id id.value diagnosis extension url url.value Elective Inpatient Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.85
    Encounter(QICoreEncounter) type period priority diagnosis location location.type location.type.value id id.value extension url url.value Elective Inpatient Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.85
    Encounter(QICoreEncounter) type status status.value period location location.type location.type.value id id.value diagnosis extension url url.value Observation Services Observation Services
    Encounter(QICoreEncounter) type status status.value period location location.type location.type.value id id.value diagnosis extension url url.value Emergency Department Visit Emergency Department Visit
    Encounter(QICoreEncounter) type period location location.type location.type.value id id.value diagnosis extension url url.value Outpatient Surgery Service Outpatient Surgery Service
    Condition(QICoreCondition) id id.value
    Procedure(QICoreProcedure) code id id.value Anesthesia Requiring Monitored Care http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.255
    Procedure(QICoreProcedure) code performed id id.value General and Neuraxial Anesthesia http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208
    Procedure(QICoreProcedure) code performed id id.value General and Neuraxial Anesthesia http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208
    Procedure(QICoreProcedure) code id id.value Intubation http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.179
    Procedure(QICoreProcedure) code id id.value Non Invasive Oxygen Therapy by Nasal Cannula or Mask http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.209
    Procedure(QICoreProcedure) code id id.value
    Procedure(QICoreProcedure) code id id.value Head, Neck, and Thoracic Surgeries with High Risk Airway Compromise http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.251
    Procedure(QICoreProcedure) code id id.value Mechanical Ventilation http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.107
    Procedure(QICoreProcedure) code id id.value Tracheostomy Procedures http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.181
    Observation(QICoreObservation) code Non Invasive Oxygen Therapy http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.213
    Observation(QICoreObservation) code value Carbon Dioxide Partial Pressure in Arterial Blood http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.95
    Observation(QICoreObservation) code value Arterial Blood pH http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.96
    Observation(QICoreObservation) code value Oxygen Partial Pressure in Arterial Blood http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.94
    Direct Reference Codes:
    display code system
    Elective (qualifier value) 103390000 http://snomed.info/sct
    Removal of endotracheal tube (procedure) 271280005 http://snomed.info/sct
    Logic Definitions:
    Group Scoring Population Criteria Expression
    67520e47670f1c0879cef598 Group scoring: proportion
    Type:

    Outcome

    Rate Aggregation: None
    Improvement Notation:

    increase

    Initial Population
    //----------------------  Measure Population Definitions --------------------------------------------------//
    
    
    define "Initial Population":
      "Elective Inpatient Encounter with OR Procedure within 3 Days"
    Denominator
    define "Denominator":
      "Initial Population"
    Denominator Exclusion
    define "Denominator Exclusions":
      "Encounter with Degenerative Neurological Disorder"
        union "Encounter with High Risk to Airway Head Neck and Thoracic Surgery"
        union "Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure"
        union "Encounter with Neuromuscular Disorder"
        union "Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure"
        union "Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure"
        union "Encounter with Principal Diagnosis of Acute Respiratory Failure"
        union "Encounter with Diagnosis of Acute Respiratory Failure Present on Admission"
        union "Encounter with Tracheostomy Present on Admission"
        union "Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure"
    Numerator
    define "Numerator":
      "Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure"
        union "Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy"
        union "Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia"
        union "Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia"
    Library Name Name
    CMS1218HHRFFHIR Elective Inpatient Encounter with Age 18 and Older without ED Visit
    //----------------------  Supporting definitions for Measure Population Definitions --------------------------------------------------//
    
    // Note: defines that are not referenced elsewhere are at the bottom of this file.
    
    // Supports:  Initial Population clause 1
    
    
    
    
    define "Elective Inpatient Encounter with Age 18 and Older without ED Visit":
      ["Encounter": "Elective Inpatient Encounter"] ElectiveEncounter
        where ElectiveEncounter.period ends during day of "Measurement Period"
          and ElectiveEncounter.priority ~ "Elective (qualifier value)"
          and AgeInYearsAt(date from start of ElectiveEncounter.period) >= 18
          and not exists ( ["Encounter": "Emergency Department Visit"] EDVisit
              where EDVisit.period ends 1 hour or less before or on start of ElectiveEncounter.period
          )
    Library Name Name
    CMS1218HHRFFHIR Elective Inpatient Encounter with Age and without Obstetrical Condition
    // Supports:  Initial Population clause 1
    
    
    define "Elective Inpatient Encounter with Age and without Obstetrical Condition":
      "Elective Inpatient Encounter with Age 18 and Older without ED Visit" ElectiveEncounter
        where not exists ElectiveEncounter.diagnosis EncounterDiagnoses
          where EncounterDiagnoses.condition.getCondition ( ).code in "Obstetrical or Pregnancy Related Conditions"
    Library Name Name
    CMS1218HHRFFHIR Elective Inpatient Encounter with OR Procedure within 3 Days
    //----------------------  Initial Population Clauses --------------------------------------------------//
    
    // Initial Population - clause 1  - (referenced throughout the measure definitions)
    
    
    
    define "Elective Inpatient Encounter with OR Procedure within 3 Days":
      "Elective Inpatient Encounter with Age and without Obstetrical Condition" ElectiveEncounter
        with ["Procedure": "General and Neuraxial Anesthesia"] SurgeryWithAnesthesia
          such that SurgeryWithAnesthesia.performed.earliest ( ) during ElectiveEncounter.hospitalizationInterval ( )
            and SurgeryWithAnesthesia.performed.earliest ( ) 3 days or less after start of ElectiveEncounter.hospitalizationInterval ( )
    Library Name Name
    CMS1218HHRFFHIR General Anesthesia and MAC
    // Referenced in numerator supporting clauses
    
    
    define "General Anesthesia and MAC":
      ["Procedure": "Anesthesia Requiring Monitored Care"] MAC
        union ["Procedure": "General and Neuraxial Anesthesia"] GA
    Library Name Name
    CMS1218HHRFFHIR Anesthesia Procedure List
    //----------------------  End Risk Variable Accessory Functions -----------------------------//
    
    //---------------------- Utility Functions --------------------------------------------------//
    
    // Used exclusively in "FirstProcedure" function, below
    
    
    
    
    define "Anesthesia Procedure List":
      ["Procedure": "General and Neuraxial Anesthesia"] AnesthesiaProcedures
        where AnesthesiaProcedures.performed.latest ( ) during day of "Measurement Period"
    Library Name Name
    CMS1218HHRFFHIR Intubation During General Anesthesia and MAC
    // Supports:  numerator clause 1
    
    
    define "Intubation During General Anesthesia and MAC":
      from
        "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery,
        ["Procedure": "Intubation"] ProceduralIntubation,
        "General Anesthesia and MAC" ProcedureWithAnesthesia
        where ProceduralIntubation.startsDuringAnesthesia ( ProcedureWithAnesthesia, EncounterWithSurgery )
        return ProceduralIntubation
    Library Name Name
    CMS1218HHRFFHIR Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure
    //fix
    
    //----------------------  Numerator Clauses --------------------------------------------------//
    
    // Numerator - clause 1
    
    
    
    
    define "Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure":
      from
        "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery,
        ["Procedure": "Intubation"] EndotrachealTubeIn
        let IntubationInterval: EndotrachealTubeIn.interval ( ),
        LatestAnesthesiaInterval: "LatestGeneralAnesthesiaOrMAC"(EndotrachealTubeIn).interval ( )
        where EndotrachealTubeIn.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )
          and EndotrachealTubeIn.startsDuringHospitalization ( EncounterWithSurgery )
          and IntubationInterval starts after end of LatestAnesthesiaInterval
          and EncounterWithSurgery.isNotAtProceduralHospitalLocationDuring ( IntubationInterval )
          and not ( "Intubation During General Anesthesia and MAC".id contains EndotrachealTubeIn.id )
        return EncounterWithSurgery
    Library Name Name
    CMS1218HHRFFHIR Noninvasive Oxygen Therapy
    // Referenced in numerator supporting clauses
    
    
    define "Noninvasive Oxygen Therapy":
      ["Procedure": "Non Invasive Oxygen Therapy by Nasal Cannula or Mask"]
        union ["Observation": "Non Invasive Oxygen Therapy"]
    Library Name Name
    CMS1218HHRFFHIR Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy
    // Numerator - clause 2
    
    
    define "Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy":
      from
        "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery,
        ["Procedure": "Mechanical Ventilation"] Ventilation,
        "Noninvasive Oxygen Therapy" OxygenSupport
        let VentilationInterval: Ventilation.interval ( ),
        LatestAnesthesiaInterval: "LatestGeneralAnesthesiaOrMAC"(Ventilation).interval ( )
        where Ventilation.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )
          and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )
          and VentilationInterval starts after end of LatestAnesthesiaInterval
          and OxygenSupport.interval ( ) starts during Interval[end of LatestAnesthesiaInterval, start of VentilationInterval]
          and EncounterWithSurgery.isNotAtProceduralHospitalLocationDuring ( VentilationInterval )
        return EncounterWithSurgery
    Library Name Name
    CMS1218HHRFFHIR Extubation with Preceding Noninvasive Oxygen
    // Supports:  numerator clause 3
    
    
    define "Extubation with Preceding Noninvasive Oxygen":
      from
        "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery,
        ["Procedure": "Removal of endotracheal tube (procedure)"] Extubation,
        "Noninvasive Oxygen Therapy" OxygenSupport
        let LatestAnesthesia: "LatestGeneralAnesthesiaOrMAC"(Extubation)
        where Extubation.startsDuringHospitalization ( EncounterWithSurgery )
          and Extubation.startsAfterAnesthesia ( LatestAnesthesia, EncounterWithSurgery )
          and OxygenSupport.interval ( ) starts during Interval[end of LatestAnesthesia.interval ( ), start of Extubation.interval ( )]
        return Extubation
    Library Name Name
    CMS1218HHRFFHIR Extubation During General Anesthesia
    // Supports:  numerator clause 3
    
    
    define "Extubation During General Anesthesia":
      from
        "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery,
        ["Procedure": "Removal of endotracheal tube (procedure)"] Extubation,
        "General Anesthesia and MAC" Anesthesia
        where Extubation.startsDuringAnesthesia ( Anesthesia, EncounterWithSurgery )
        return Extubation
    Library Name Name
    CMS1218HHRFFHIR Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia
    //fix
    
    
    // Numerator - clause 3
    
    
    
    define "Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia":
      from
        "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery,
        ["Procedure": "Removal of endotracheal tube (procedure)"] Extubation
        let ExtubationInterval: Extubation.interval ( ),
        LatestAnesthesiaInterval: "LatestGeneralAnesthesiaOrMAC"(Extubation).interval ( )
        where Extubation.isDuringHospitalization ( EncounterWithSurgery )
          and Extubation.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )
          and ExtubationInterval starts more than 48 hours after end of LatestAnesthesiaInterval
          and not ( ( "Extubation with Preceding Noninvasive Oxygen".id contains Extubation.id )
              and not ( "Extubation During General Anesthesia".id contains Extubation.id )
          )
          and EncounterWithSurgery.isNotAtProceduralHospitalLocation ( )
        return EncounterWithSurgery
    Library Name Name
    CMS1218HHRFFHIR Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia
    // Numerator - clause 4
    
    
    define "Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia":
      from
        "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery,
        ["Procedure": "Mechanical Ventilation"] Ventilation
        let VentilationInterval: Ventilation.interval ( ),
        LatestAnesthesiaInterval: "LatestGeneralAnesthesiaOrMAC"(Ventilation).interval ( )
        where VentilationInterval starts 48 hours or more after end of LatestAnesthesiaInterval
          and VentilationInterval starts 72 hours or less after end of LatestAnesthesiaInterval
          and Ventilation.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )
          and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )
          and not ( "Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy".id contains EncounterWithSurgery.id )
          and EncounterWithSurgery.isNotAtProceduralHospitalLocation ( )
        return EncounterWithSurgery
    Library Name Name
    CMS1218HHRFFHIR Numerator
    define "Numerator":
      "Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure"
        union "Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy"
        union "Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia"
        union "Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia"
    Library Name Name
    CMS1218HHRFFHIR Initial Population
    //----------------------  Measure Population Definitions --------------------------------------------------//
    
    
    define "Initial Population":
      "Elective Inpatient Encounter with OR Procedure within 3 Days"
    Library Name Name
    CMS1218HHRFFHIR Denominator
    define "Denominator":
      "Initial Population"
    Library Name Name
    CMS1218HHRFFHIR Encounter with Degenerative Neurological Disorder
    //----------------------  Denominator Exclusion Clauses------------------------------------------------//
    
    // Denominator Exclusions - clause 1
    
    
    
    define "Encounter with Degenerative Neurological Disorder":
      "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery
        where exists ( EncounterWithSurgery.diagnosis EncounterDiagnosis
            where EncounterDiagnosis.condition.getCondition ( ).code in "Degenerative Neurological Disorder"
        )
    Library Name Name
    CMS1218HHRFFHIR Encounter with High Risk to Airway Head Neck and Thoracic Surgery
    // Denominator Exclusions - clause 2
    
    
    define "Encounter with High Risk to Airway Head Neck and Thoracic Surgery":
      "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery
        with ["Procedure": "Head, Neck, and Thoracic Surgeries with High Risk Airway Compromise"] HeadNeckProcedures
          such that HeadNeckProcedures.startsDuringHospitalization ( EncounterWithSurgery )
    Library Name Name
    CMS1218HHRFFHIR Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure
    // Denominator Exclusions - clause 3
    
    
    define "Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure":
      "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery
        with ["Procedure": "Mechanical Ventilation"] Ventilation
          such that Ventilation.interval ( ) starts more than 1 hour before start of FirstAnesthesiaDuringHospitalization(EncounterWithSurgery).interval ( )
            and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )
    Library Name Name
    CMS1218HHRFFHIR Encounter with Neuromuscular Disorder
    // Denominator Exclusions - clause 4
    
    
    define "Encounter with Neuromuscular Disorder":
      "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery
        where exists ( EncounterWithSurgery.diagnosis EncounterDiagnosis
            where EncounterDiagnosis.condition.getCondition ( ).code in "Neuromuscular Disorder"
        )
    Library Name Name
    CMS1218HHRFFHIR Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure
    // Denominator Exclusions - clause 5
    
    
    define "Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure":
      from
        "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery,
        ["Observation": "Carbon Dioxide Partial Pressure in Arterial Blood"] CarbonDioxide,
        ["Observation": "Arterial Blood pH"] BloodpH
        let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery),
        FirstProcedureTime: FirstProcedure.interval ( )
        where CarbonDioxide.interval ( ) starts 48 hours or less before start of FirstProcedureTime
          and CarbonDioxide.value as Quantity > 50 'mm[Hg]'
          and BloodpH.interval ( ) starts 48 hours or less before start of FirstProcedureTime
          and BloodpH.value as Quantity < 7.30 '[pH]'
          and FirstProcedure is not null
        return EncounterWithSurgery
    Library Name Name
    CMS1218HHRFFHIR Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure
    //fix
    
    // Denominator Exclusions - clause 6
    
    
    
    define "Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure":
      "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery
        let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery)
        with ["Observation": "Oxygen Partial Pressure in Arterial Blood"] Oxygen
          such that Oxygen.interval ( ) starts 48 hours or less before start of FirstProcedure.interval ( )
            and Oxygen.value as Quantity < 50 'mm[Hg]'
            and FirstProcedure is not null
        return EncounterWithSurgery
    Library Name Name
    CMS1218HHRFFHIR Encounter with Principal Diagnosis of Acute Respiratory Failure
    // Denominator Exclusions - clause 7
    
    
    define "Encounter with Principal Diagnosis of Acute Respiratory Failure":
      "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery
        where exists ( EncounterWithSurgery.diagnosis Diagnosis
            where Diagnosis.condition.getCondition ( ).code in "Acute Respiratory Failure"
              and Diagnosis.rank = 1
        )
    Library Name Name
    CMS1218HHRFFHIR Encounter with Diagnosis of Acute Respiratory Failure Present on Admission
    // Denominator Exclusions - clause 8
    
    
    define "Encounter with Diagnosis of Acute Respiratory Failure Present on Admission":
      "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery
        where EncounterWithSurgery.diagnosisPresentOnAdmission ( ) in "Present on Admission or Clinically Undetermined"
          and exists ( EncounterWithSurgery.diagnosis Diagnosis
              where Diagnosis.condition.getCondition ( ).code in "Acute Respiratory Failure"
          )
    Library Name Name
    CMS1218HHRFFHIR Encounter with Tracheostomy Present on Admission
    //fix
    
    // Denominator Exclusions - clause 9
    
    
    
    define "Encounter with Tracheostomy Present on Admission":
      "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery
        where EncounterWithSurgery.diagnosisPresentOnAdmission ( ) in "Present on Admission or Clinically Undetermined"
          and exists ( EncounterWithSurgery.diagnosis Dx
              where Dx.condition.getCondition ( ).code in "Tracheostomy Diagnoses"
          )
    Library Name Name
    CMS1218HHRFFHIR Encounter with Tracheostomy Before Day of First OR Procedure
    // Supports:  denominator exclusions clause 10
    
    
    define "Encounter with Tracheostomy Before Day of First OR Procedure":
      "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery
        let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery)
        with ["Procedure": "Tracheostomy Procedures"] TracheostomySurgery
          such that TracheostomySurgery.startsDuringHospitalization ( EncounterWithSurgery )
            and TracheostomySurgery.interval ( ) starts before day of FirstProcedure.interval ( )
            and FirstProcedure is not null
    Library Name Name
    CMS1218HHRFFHIR Encounter with Tracheostomy Same Day of First OR Procedure
    // Supports:  denominator exclusions clause 10
    
    
    define "Encounter with Tracheostomy Same Day of First OR Procedure":
      "Elective Inpatient Encounter with OR Procedure within 3 Days" EncounterWithSurgery
        let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery)
        with ["Procedure": "Tracheostomy Procedures"] TracheostomySurgery
          such that TracheostomySurgery.startsDuringHospitalization ( EncounterWithSurgery )
            and TracheostomySurgery.interval ( ) starts during day of FirstProcedure.interval ( )
            and FirstProcedure is not null
    Library Name Name
    CMS1218HHRFFHIR Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure
    // Denominator Exclusions - clause 10
    
    
    define "Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure":
      "Encounter with Tracheostomy Before Day of First OR Procedure"
        union "Encounter with Tracheostomy Same Day of First OR Procedure"
    Library Name Name
    CMS1218HHRFFHIR Denominator Exclusions
    define "Denominator Exclusions":
      "Encounter with Degenerative Neurological Disorder"
        union "Encounter with High Risk to Airway Head Neck and Thoracic Surgery"
        union "Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure"
        union "Encounter with Neuromuscular Disorder"
        union "Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure"
        union "Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure"
        union "Encounter with Principal Diagnosis of Acute Respiratory Failure"
        union "Encounter with Diagnosis of Acute Respiratory Failure Present on Admission"
        union "Encounter with Tracheostomy Present on Admission"
        union "Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure"
    Library Name Name
    CQMCommon getCondition
    /*
    @description: Returns the Condition resource for the given reference
    */
    define fluent function getCondition(reference Reference):
      singleton from ([Condition] C where C.id = reference.reference.getId())
    Library Name Name
    QICoreCommon getId
    /*
    @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).
    @comment: This function can be used to determine the logical id of a given resource. It can be used in
    a single-server environment to trace references. However, this function does not attempt to resolve
    or distinguish the base of the given url, and so cannot be used safely in multi-server environments.
    */
    define fluent function getId(uri String):
      Last(Split(uri, '/'))
    Library Name Name
    CMS1218HHRFFHIR hospitalizationInterval
    define fluent function hospitalizationInterval(enc Encounter):
      enc.hospitalizationWithObservationAndOutpatientSurgeryService ( )
    Library Name Name
    CQMCommon hospitalizationWithObservationAndOutpatientSurgeryService
    /*
    @description: Hospitalization with Observation and Outpatient Surgery Service returns the total interval from the start of any immediately prior emergency department visit, outpatient surgery visit or observation visit to the discharge of the given encounter.
    */
    define fluent function hospitalizationWithObservationAndOutpatientSurgeryService(TheEncounter "Encounter" ):
      TheEncounter Visit
    	  let ObsVisit: Last([Encounter: "Observation Services"] LastObs
    		  	where LastObs.status = 'finished'
              and LastObs.period ends 1 hour or less on or before start of Visit.period
    			  sort by	end of period
        	),
        	VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
        	EDVisit: Last([Encounter: "Emergency Department Visit"] LastED
    			  where LastED.status = 'finished'
              and LastED.period ends 1 hour or less on or before VisitStart
    			  sort by	end of period
        	),
        	VisitStartWithED: Coalesce(start of EDVisit.period, VisitStart),
        	OutpatientSurgeryVisit: Last([Encounter: "Outpatient Surgery Service"] LastSurgeryOP
    			  where LastSurgeryOP.period ends 1 hour or less on or before VisitStartWithED
    			  sort by	end of period
        	)
      	return Interval[Coalesce(start of OutpatientSurgeryVisit.period, VisitStartWithED), end of Visit.period]
    Library Name Name
    HospitalHarm interval
    // interval
    // Given an encounter, procedure or observation resource, returns a normalized Interval object, calculated using QICoreCommon.ToInterval for the given type of resource. 
    // Usage:   theEncounter.interval()
    
    
    define fluent function interval(choice Choice<Procedure,Observation,Encounter>):
       case
          when choice is Procedure   then QICoreCommon.ToInterval ( (choice as Procedure).performed ) 
          when choice is Observation then QICoreCommon.ToInterval ( (choice as Observation).effective ) 
          when choice is Encounter   then QICoreCommon.ToInterval ( (choice as Encounter).period ) 
      else null as Interval<DateTime>
        end
    Library Name Name
    QICoreCommon ToInterval
    /*
    @description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
    @comment: Normalizes a choice type of DateTime, Quanitty, Interval<DateTime>, or Interval<Quantity> types
    to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
    representations for timing-valued elements in QICore, allowing this function to be used across any resource.
    The input can be provided as a DateTime, Quantity, Interval<DateTime> or Interval<Quantity>.
    The intent of this function is to provide a clear and concise mechanism to treat single
    elements that have multiple possible representations as intervals so that logic doesn't have to account
    for the variability. More complex calculations (such as medication request period or dispense period
    calculation) need specific guidance and consideration. That guidance may make use of this function, but
    the focus of this function is on single element calculations where the semantics are unambiguous.
    If the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.
    If the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,
    and the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.
    If the input is a DateTime Interval, the result is the input.
    If the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result
    is a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending
    immediately before one year later than the date the patient turned the age given as the end of the quantity interval.
    If the input is a Timing, an error will be thrown indicating that Timing calculations are not implemented. Any other input will reslt in a null DateTime Interval
    @deprecated: This function is deprecated. Use the fluent function `toInterval()` instead
    */
    define function ToInterval(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>, Timing>):
      case
    	  when choice is DateTime then
        	Interval[choice as DateTime, choice as DateTime]
    		when choice is Interval<DateTime> then
      		choice as Interval<DateTime>
    		when choice is Quantity then
    		  Interval[Patient.birthDate + (choice as Quantity),
    			  Patient.birthDate + (choice as Quantity) + 1 year)
    		when choice is Interval<Quantity> then
    		  Interval[Patient.birthDate + (choice.low as Quantity),
    			  Patient.birthDate + (choice.high as Quantity) + 1 year)
    		when choice is Timing then
          Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval<DateTime>
    		else
    			null as Interval<DateTime>
    	end
    Library Name Name
    CMS1218HHRFFHIR LatestGeneralAnesthesiaOrMAC
    define function "LatestGeneralAnesthesiaOrMAC"(event Procedure):
      Last("General Anesthesia and MAC" ProcedureList
          where ProcedureList.interval() ends before start of event.interval()
          sort by start of QICoreCommon.ToInterval(performed)
      )
    Library Name Name
    CMS1218HHRFFHIR starts30DaysOrLessAfterFirstProcedure
    define fluent function starts30DaysOrLessAfterFirstProcedure(procedure Procedure, encounter Encounter):
      procedure.interval ( ) starts 30 days or less after end of FirstAnesthesiaDuringHospitalization(encounter).interval ( )
    Library Name Name
    CMS1218HHRFFHIR FirstAnesthesiaDuringHospitalization
    // Returns the first anesthesia procedure that starts during the hospitalization encounter.
    
    
    define function "FirstAnesthesiaDuringHospitalization"(QualifyingEncounter Encounter):
      First("Anesthesia Procedure List" anesthesia
          where anesthesia.startsDuringHospitalization(QualifyingEncounter)
          sort by start of performed
      )
    Library Name Name
    HospitalHarm startsDuringHospitalization
    // startsDuringHospitalization
    // Given an encounter, returns true if the calling observation effective time or procedure performed starts during that encounter. 
    // The interval of the encounter is
    // determined by calling the CQCommon function 'HospitalizationWithObservationAndOutpatientSurgeryService'wth the encounter as the argument.
    // Usage:   theObservation.startsDuringHospitalization(anEncounter)
    
    
    define fluent function startsDuringHospitalization(choice Choice<Procedure,Observation>, enc Encounter):
       case
          when choice is Procedure then QICoreCommon.ToInterval ( (choice as Procedure).performed ) starts during CQMCommon."HospitalizationWithObservationAndOutpatientSurgeryService" ( enc )
          when choice is Observation then QICoreCommon.ToInterval ( (choice as Observation).effective ) starts during CQMCommon."HospitalizationWithObservationAndOutpatientSurgeryService" ( enc )
    else false
        end
    Library Name Name
    CQMCommon HospitalizationWithObservationAndOutpatientSurgeryService
    /*
    @description: Hospitalization with Observation and Outpatient Surgery Service returns the total interval from the start of any immediately prior emergency department visit, outpatient surgery visit or observation visit to the discharge of the given encounter.
    @deprecated: This function is deprecated. Use the fluent function `hospitalizationWithObservationAndOutpatientSurgeryService()` instead.
    */
    define function "HospitalizationWithObservationAndOutpatientSurgeryService"(TheEncounter "Encounter" ):
      TheEncounter Visit
    	  let ObsVisit: Last([Encounter: "Observation Services"] LastObs
    		  	where LastObs.status = 'finished'
              and LastObs.period ends 1 hour or less on or before start of Visit.period
    			  sort by	end of period
        	),
        	VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
        	EDVisit: Last([Encounter: "Emergency Department Visit"] LastED
    			  where LastED.status = 'finished'
              and LastED.period ends 1 hour or less on or before VisitStart
    			  sort by	end of period
        	),
        	VisitStartWithED: Coalesce(start of EDVisit.period, VisitStart),
        	OutpatientSurgeryVisit: Last([Encounter: "Outpatient Surgery Service"] LastSurgeryOP
    			  where LastSurgeryOP.period ends 1 hour or less on or before VisitStartWithED
    			  sort by	end of period
        	)
      	return Interval[Coalesce(start of OutpatientSurgeryVisit.period, VisitStartWithED), end of Visit.period]
    Library Name Name
    CMS1218HHRFFHIR isNotAtProceduralHospitalLocationDuring
    define fluent function isNotAtProceduralHospitalLocationDuring(encounter Encounter, intrvl Interval<DateTime>):
      ( not exists ( encounter.location EncounterLocation
            where EncounterLocation.location.type in "Procedural Hospital Locations"
              and EncounterLocation.period starts during intrvl
        )
      )
    Library Name Name
    CMS1218HHRFFHIR startsDuringAnesthesia
    // and procedure.startsDuringHospitalization(EncounterWithSurgery)
    
    
    define fluent function startsDuringAnesthesia(procedure Procedure, anesthesia Procedure, encounterWithSurgery Encounter):
      procedure.interval ( ) starts during anesthesia.interval ( )
        and procedure.startsDuringHospitalization ( encounterWithSurgery )
    Library Name Name
    HospitalHarm isDuringHospitalization
    // isDuringHospitalization
    // Given an encounter, returns true if the calling observation effective time or procedure performed occurs during that encounter. 
    // The interval of the encounter is
    // determined by calling the CQCommon function 'HospitalizationWithObservationAndOutpatientSurgeryService'wth the encounter as the argument.
    // Usage:   theProcedure.isDuringHospitalization(anEncounter)
    
    
    define fluent function isDuringHospitalization(choice Choice<Procedure,Observation>, enc Encounter):
       case
          when choice is Procedure then  
            QICoreCommon.ToInterval ( (choice as Procedure).performed )  during CQMCommon."HospitalizationWithObservationAndOutpatientSurgeryService" ( enc )
          when choice is Observation then  
             QICoreCommon.ToInterval ((choice as Observation).effective ) during CQMCommon."HospitalizationWithObservationAndOutpatientSurgeryService" ( enc )
    else false
        end
    Library Name Name
    CMS1218HHRFFHIR startsAfterAnesthesia
    define fluent function startsAfterAnesthesia(procedure Procedure, anesthesia Procedure, encounterWithSurgery Encounter):
      procedure.interval ( ) starts after anesthesia.interval ( )
        and procedure.startsDuringHospitalization ( encounterWithSurgery )
    Library Name Name
    CMS1218HHRFFHIR isNotAtProceduralHospitalLocation
    define fluent function isNotAtProceduralHospitalLocation(encounter Encounter):
      ( not exists ( encounter.location EncounterLocation
            where EncounterLocation.location.type in "Procedural Hospital Locations"
        )
      )
    Library Name Name
    HospitalHarm diagnosisPresentOnAdmission
    // diagnosisPresentOnAdmission
    // Given an Encounter, this function returns the Present On Admission code of encounter's diagnosis, if present. Returns null otherwiese. 
    // Usage: anEncouner.diagnosisPresentOnAdmission()
    
    define fluent function diagnosisPresentOnAdmission(enc Encounter):
      (singleton from (
        enc.diagnosis.extension E where E.url = 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter-diagnosisPresentOnAdmission'
      )).value as Concept

    Source

    {
      "resourceType" : "Measure",
      "id" : "CMS1218HHRFFHIR",
      "meta" : {
        "profile" : [
          "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm",
          "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm",
          "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"
        ]
      },
      "text" : {
        "status" : "extensions",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <table class=\"grid dict\">\n \n <tr>\n <th scope=\"row\"><b>Title: </b></th>\n <td style=\"padding-left: 4px;\">Hospital Harm - Postoperative Respiratory FailureFHIR</td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Id: </b></th>\n <td style=\"padding-left: 4px;\">CMS1218HHRFFHIR</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Version: </b></th>\n <td style=\"padding-left: 4px;\">0.0.003</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Url: </b></th>\n <td style=\"padding-left: 4px;\"><a href=\"Measure-CMS1218HHRFFHIR.html\">Hospital Harm - Postoperative Respiratory FailureFHIR</a></td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n Short Name Identifier:\n \n \n </b>\n </th>\n\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>CMS1218FHIR</span>\n </p>\n \n </td>\n </tr>\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n Version Independent Identifier:\n \n \n </b>\n </th>\n\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>urn:uuid:b6857e46-6412-432d-abc8-0508efc0d2d7</span>\n </p>\n \n </td>\n </tr>\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n Version Specific Identifier:\n \n \n </b>\n </th>\n\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>urn:uuid:447f5c0f-f39c-4a27-a0bc-d5ae918bef10</span>\n </p>\n \n </td>\n </tr>\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n Endorser (CMS Consensus Based Entity) Identifier:\n \n \n </b>\n </th>\n\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>4130e</span>\n </p>\n \n </td>\n </tr>\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n Publisher (CMS) Identifier:\n \n \n </b>\n </th>\n\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>1218FHIR</span>\n </p>\n \n </td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Effective Period: </b></th>\n <td style=\"padding-left: 4px;\">2026-01-01..2026-12-31</td>\n </tr>\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Publisher: </b></th>\n <td style=\"padding-left: 4px;\">Centers for Medicare &amp; Medicaid Services (CMS)</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Author: </b></th>\n <td style=\"padding-left: 4px;\">Mathematica</td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Description: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>This measure assesses the number of elective inpatient hospitalizations for patients aged 18 years and older without an obstetrical condition who have a procedure resulting in postoperative respiratory failure (PRF)</p>\n</div></td>\n </tr>\n \n\n \n\n \n\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Purpose: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>UNKNOWN</p>\n</div></td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Copyright: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc.</p>\n<p>This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.</p>\n</div></td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Disclaimer: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>This performance measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications.</p>\n<p>THE MEASURES AND SPECIFICATIONS ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND.</p>\n<p>Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].</p>\n</div></td>\n </tr>\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Rationale: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>Postoperative respiratory failure (PRF), defined as unplanned endotracheal reintubation, prolonged inability to wean from mechanical ventilation, or inadequate oxygenation and/or ventilation, is the most common serious postoperative pulmonary complication, with an incidence of up to 7.5% (the incidence of any postoperative pulmonary complication ranges from 10-40%) (Arozullah et al., 2000; Canet et al., 2015; Gupta et al., 2011; Kor et al., 2014). This measure addresses the prevalence of PRF and the variance between hospitals in the incidence of PRF. PRF is a serious complication that can increase the risk of morbidity and mortality, with in-hospital mortality resulting from PRF estimated at 25% to 40% (Arozullah et al., 2000; Canet &amp; Gallart, 2014). Surgical procedures complicated by PRF have 3.74 times higher adjusted odds of death than those not complicated by respiratory failure, 1.47 times higher odds of 90-day readmission, and 1.86 times higher odds of an outpatient visit with one of 44 postoperative conditions (e.g., bacterial infection, fluid and electrolyte disorder, abdominal hernia) within 90 days of hospital discharge (Miller et al., 2001; Romano et al, 2009). PRF is additionally associated with prolonged mechanical ventilation and the need for rehabilitation or skilled nursing facility placement upon discharge (Thompson &amp; Lisco, 2018).</p>\n<p>The incidence of PRF varies by hospital, with higher reported rates of PRF in nonteaching hospitals than teaching hospitals (Rahman et al., 2013). Additionally, one study found that the odds of developing PRF increased by 6% for each level increase in hospital size from small to large (Rahman et al., 2013). This suggests that there remains room for improvement in hospitals reporting higher rates of PRF.</p>\n<p>The most widely used current measures of PRF are based on either claims data (CMS Patient Safety Indicator (PSI) 11) or proprietary registry data (National Surgical Quality Improvement Program (NSQIP) of the American College of Surgeons). The eCQM is closely modeled after the NSQIP measure of PRF, which has been widely adopted across American hospitals, and is intended to complement and eventually supplant CMS PSI 11.</p>\n</div></td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Clinical recommendation statement: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>Recent studies and current clinical practice guidelines for PRF have identified enhanced recovery pathways, prophylactic mucolytics, postoperative continuous positive airway pressure ventilation, lung protective intraoperative ventilation, prophylactic respiratory physiotherapy, epidural analgesia, and goal directed hemodynamic therapy as evidence-based interventions to reduce the incidence of PRF. Yet, progress in reducing the incidence of PRF has been stymied by lack of consensus regarding the definition of PRF, which patients are most at-risk, which risk factors are potentially modifiable, and which patients are more likely to benefit from targeted interventions of a health care system’s limited resources. This measure would address this gap in data.</p>\n<p>Relevant clinical guidelines for preventing postoperative respiratory failure can be found in the following:</p>\n<ul>\n<li>Mohanty, et al. Optimal Perioperative Management of the Geriatric Patient: Best Practices Guideline from ACS NSQIP/AGS, 2016</li>\n<li>Piraino, et al. AARC Clinical Practice Guideline: Management of Adult Patients with Oxygen in the Acute Care Setting, 2022</li>\n</ul>\n</div></td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Guidance (Usage): </b></th>\n <td style=\"padding-left: 4px;\">PRF is evaluated using mechanical ventilation (MV) documentation or intubation and extubation documentation to allow for hospital documentation variances. Therefore, if MV documentation is not available, intubation and extubation can serve as a proxy for determining if MV occurred and its duration. To determine that an unplanned initiation of MV occurred, the logic looks for evidence of a non-invasive oxygen therapy assessment such as oxygen via 'nasal canula' or 'breathing room air' prior to the MV occurrence to verify that MV was newly initiated. Additionally, facility location codes are used to determine if MV was initiated outside of a procedural area (e.g., medical floor). Conversely, to determine MV duration, the logic looks for evidence that a non-invasive oxygen therapy assessment or another operating room procedure does not exist prior to the MV occurrence to verify that MV was continued without interruption from a procedural area. \n\t\nThis eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.\n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS1218v2. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).</td>\n </tr>\n \n\n \n \n <tr>\n <th scope=\"row\"><b>Population Criteria: </b></th>\n <td style=\"padding-left: 4px;\">\n \n <table class=\"grid-dict\">\n \n <tr>\n <th><b>67520e47670f1c0879cef598</b></th>\n </tr>\n \n \n <tr>\n <td>Initial Population:</td>\n\n \n \n <td>Elective inpatient hospitalizations with no preceding emergency department visit that end during the measurement period for patients aged 18 and older without an obstetrical condition and at least one surgical procedure was performed within the first 3 days of the encounter</td>\n \n \n\n </tr>\n \n <tr>\n <td>Denominator:</td>\n\n \n \n <td>Equals Initial Population</td>\n \n \n\n </tr>\n \n <tr>\n <td>Denominator Exclusion:</td>\n\n \n \n <td>Inpatient hospitalizations for patients:\n\nWith a diagnosis for a degenerative neurological disorder\n\nWith any selected head, neck, and thoracic surgery involving significant risk of airway compromise or requiring airway protection\n\nWho have mechanical ventilation that starts more than one hour prior to the start of the first operating room (OR) procedure\n\nWith a diagnosis for a neuromuscular disorder\n\nWith arterial partial pressure of carbon dioxide (PaCO2)&gt;50 mmHg combined with an arterial pH&lt;7.30 within 48 hours or less prior to the start of the first OR procedure\n\nWith arterial partial pressure of oxygen (PaO2)&lt;50 mmHg within 48 hours or less prior to the start of the first OR procedure\n\nWith a principal diagnosis for acute respiratory failure\n\nWith a diagnosis for acute respiratory failure present on admission\n\nWith any diagnosis present on admission for the existence of a tracheostomy\n\nWhere a tracheostomy is performed before or on the same day as the first OR procedure</td>\n \n \n\n </tr>\n \n <tr>\n <td>Numerator:</td>\n\n \n \n <td>Elective inpatient hospitalizations for patients with postoperative respiratory failure as evidenced by any of the following:\n\nCriterion A: Mechanical ventilation (MV) initiated within 30 days after first OR procedure, as evidenced by:\n\nA.1. Intubation that occurs outside of a procedural area and within 30 days after the end of the/first OR procedure of the encounter.\n\nor\n\nA.2. MV that occurs outside of a procedural area within 30 days after the end of the first OR procedure of the encounter and is preceded by a period of non-invasive oxygen therapy between the end of the OR procedure and the MV occurrence, and without a subsequent OR procedure between the non-invasive oxygen therapy and the MV occurrence.\n\nor\n\nCriterion B: MV with a duration of more than 48 hours after the first OR procedure, as evidenced by:\n\nB.1. Extubation that occurs outside of a procedural area more than 48 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a period of non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the extubation occurrence.\n\nor\n\nB.2 Mechanical ventilation that occurs between 48 and 72 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the MV occurrence./</td>\n \n \n\n </tr>\n \n \n </table>\n \n </td>\n </tr>\n \n \n\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Libraries: </b></th>\n <td style=\"padding-left: 4px;\">\n <table class=\"grid-dict\">\n \n <tr>\n <td><a href=\"Library-CMS1218HHRFFHIR.html\">CMS1218HHRFFHIR</a></td>\n </tr>\n \n </table>\n </td>\n </tr>\n \n\n \n\n \n \n <tr>\n <th scope=\"row\"><b>Terminology and Other Dependencies: </b></th>\n <td style=\"padding-left: 4px;\">\n \n <li><code>Library/FHIRHelpers|4.4.000</code></li>\n \n <li><code>Library/CQMCommon|2.2.000</code></li>\n \n <li><code>Library/QICoreCommon|2.1.000</code></li>\n \n <li><code>Library/HospitalHarm|1.1.000</code></li>\n \n <li><a href=\"http://hl7.org/fhir/R4/codesystem-snomedct.html\">SNOMED CT (all versions)</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.85/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.85</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.263/expansion\">Obstetrics</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.208/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion\">Observation Services</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.38/expansion\">Outpatient Surgery Service</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.179/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.179</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.255/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.255</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.216/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.216</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.107/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.107</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.209/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.209</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.213/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.213</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.241/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.241</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.251/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.251</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.239/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.239</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.95/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.95</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.96/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.96</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.94/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.94</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.88/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.88</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1147.197/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1147.197</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.89/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.89</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.181/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.181</a></li>\n \n </td>\n </tr>\n <tr>\n <th scope=\"row\"><b>Parameters:</b></th>\n <td style=\"padding-left: 4px;\">\n <table class=\"grid-dict\">\n <tr>\n <th><b>name</b></th>\n <th><b>use</b></th>\n <th><b>min</b></th>\n <th><b>max</b></th>\n <th><b>type</b></th>\n </tr>\n \n <tr>\n <td>Measurement Period</td>\n <td>In</td>\n <td>0</td>\n <td>1</td>\n <td>Period</td>\n </tr>\n \n <tr>\n <td>Numerator</td>\n <td>Out</td>\n <td>0</td>\n <td>*</td>\n <td>Resource</td>\n </tr>\n \n <tr>\n <td>Denominator</td>\n <td>Out</td>\n <td>0</td>\n <td>*</td>\n <td>Resource</td>\n </tr>\n \n <tr>\n <td>Initial Population</td>\n <td>Out</td>\n <td>0</td>\n <td>*</td>\n <td>Resource</td>\n </tr>\n \n <tr>\n <td>Denominator Exclusions</td>\n <td>Out</td>\n <td>0</td>\n <td>*</td>\n <td>Resource</td>\n </tr>\n \n </table>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\"><b>DataRequirements:</b></th>\n <td style=\"padding-left: 4px;\">\n <table class=\"grid-dict\">\n <tr>\n <th><b>Resource Type</b></th>\n <th><b>Resource Elements</b></th>\n <th><b>Valueset Name</b></th>\n <th><b>Valueset</b></th>\n </tr>\n \n <tr>\n <td>Patient(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-patient.html\">QICorePatient</a>)</td>\n <td>\n \n </td>\n <td>\n \n </td>\n <td/>\n </tr>\n \n <tr>\n <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n <td>\n \n type\n \n period\n \n location\n \n location.type\n \n location.type.value\n \n id\n \n id.value\n \n diagnosis\n \n extension\n \n url\n \n url.value\n \n </td>\n <td>\n \n \n Emergency Department Visit\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a></td>\n </tr>\n \n <tr>\n <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n <td>\n \n type\n \n period\n \n priority\n \n location\n \n location.type\n \n location.type.value\n \n id\n \n id.value\n \n diagnosis\n \n extension\n \n url\n \n url.value\n \n </td>\n <td>\n \n \n Elective Inpatient Encounter\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.85/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.85</a></td>\n </tr>\n \n <tr>\n <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n <td>\n \n type\n \n period\n \n priority\n \n diagnosis\n \n location\n \n location.type\n \n location.type.value\n \n id\n \n id.value\n \n extension\n \n url\n \n url.value\n \n </td>\n <td>\n \n \n Elective Inpatient Encounter\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.85/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.85</a></td>\n </tr>\n \n <tr>\n <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n <td>\n \n type\n \n status\n \n status.value\n \n period\n \n location\n \n location.type\n \n location.type.value\n \n id\n \n id.value\n \n diagnosis\n \n extension\n \n url\n \n url.value\n \n </td>\n <td>\n \n \n Observation Services\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion\">Observation Services</a></td>\n </tr>\n \n <tr>\n <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n <td>\n \n type\n \n status\n \n status.value\n \n period\n \n location\n \n location.type\n \n location.type.value\n \n id\n \n id.value\n \n diagnosis\n \n extension\n \n url\n \n url.value\n \n </td>\n <td>\n \n \n Emergency Department Visit\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a></td>\n </tr>\n \n <tr>\n <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n <td>\n \n type\n \n period\n \n location\n \n location.type\n \n location.type.value\n \n id\n \n id.value\n \n diagnosis\n \n extension\n \n url\n \n url.value\n \n </td>\n <td>\n \n \n Outpatient Surgery Service\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.38/expansion\">Outpatient Surgery Service</a></td>\n </tr>\n \n <tr>\n <td>Condition(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html\">QICoreCondition</a>)</td>\n <td>\n \n id\n \n id.value\n \n </td>\n <td>\n \n </td>\n <td/>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n id\n \n id.value\n \n </td>\n <td>\n \n \n Anesthesia Requiring Monitored Care\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.255/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.255</a></td>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n performed\n \n id\n \n id.value\n \n </td>\n <td>\n \n \n General and Neuraxial Anesthesia\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.208/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208</a></td>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n performed\n \n id\n \n id.value\n \n </td>\n <td>\n \n \n General and Neuraxial Anesthesia\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.208/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208</a></td>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n id\n \n id.value\n \n </td>\n <td>\n \n \n Intubation\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.179/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.179</a></td>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n id\n \n id.value\n \n </td>\n <td>\n \n \n Non Invasive Oxygen Therapy by Nasal Cannula or Mask\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.209/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.209</a></td>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n id\n \n id.value\n \n </td>\n <td>\n \n </td>\n <td/>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n id\n \n id.value\n \n </td>\n <td>\n \n \n Head, Neck, and Thoracic Surgeries with High Risk Airway Compromise\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.251/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.251</a></td>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n id\n \n id.value\n \n </td>\n <td>\n \n \n Mechanical Ventilation\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.107/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.107</a></td>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n id\n \n id.value\n \n </td>\n <td>\n \n \n Tracheostomy Procedures\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.181/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.181</a></td>\n </tr>\n \n <tr>\n <td>Observation(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html\">QICoreObservation</a>)</td>\n <td>\n \n code\n \n </td>\n <td>\n \n \n Non Invasive Oxygen Therapy\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.213/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.213</a></td>\n </tr>\n \n <tr>\n <td>Observation(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html\">QICoreObservation</a>)</td>\n <td>\n \n code\n \n value\n \n </td>\n <td>\n \n \n Carbon Dioxide Partial Pressure in Arterial Blood\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.95/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.95</a></td>\n </tr>\n \n <tr>\n <td>Observation(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html\">QICoreObservation</a>)</td>\n <td>\n \n code\n \n value\n \n </td>\n <td>\n \n \n Arterial Blood pH\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.96/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.96</a></td>\n </tr>\n \n <tr>\n <td>Observation(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html\">QICoreObservation</a>)</td>\n <td>\n \n code\n \n value\n \n </td>\n <td>\n \n \n Oxygen Partial Pressure in Arterial Blood\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.94/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.94</a></td>\n </tr>\n \n </table>\n </td>\n </tr>\n\n \n <tr>\n <th scope=\"row\"><b>Direct Reference Codes:</b></th>\n <td style=\"padding-left: 4px;\">\n <table class=\"grid-dict\">\n <tr>\n <th><b>display</b></th>\n <th><b>code</b></th>\n <th><b>system</b></th>\n </tr>\n \n <tr>\n <td>Elective (qualifier value)</td>\n <td>103390000</td>\n <td><a href=\"https://browser.ihtsdotools.org/\">http://snomed.info/sct</a></td>\n </tr>\n \n <tr>\n <td>Removal of endotracheal tube (procedure)</td>\n <td>271280005</td>\n <td><a href=\"https://browser.ihtsdotools.org/\">http://snomed.info/sct</a></td>\n </tr>\n \n </table>\n </td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Logic Definitions:</b></th>\n <td style=\"padding-left: 4px;\">\n \n <table class=\"grid-dict\">\n <tr>\n <th><b>Group</b></th>\n <th><b>Scoring</b></th>\n <th><b>Population Criteria</b></th>\n <th><b>Expression</b></th>\n </tr>\n <tr>\n \n <td> 67520e47670f1c0879cef598 </td>\n <td colspan=\"3\" style=\"padding-left: 4px;\">\n \n <b>Group scoring:</b>\n \n <span> proportion </span>\n \n \n\n \n\n \n\n \n\n \n <tr>\n \n <th scope=\"row\"><b>Type: </b></th>\n <td style=\"padding-left: 4px;\">\n \n \n <p style=\"margin-bottom: 5px;\">\n <span>Outcome </span>\n </p>\n \n \n \n </td>\n \n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Rate Aggregation: </b></th>\n <td colspan=\"3\" style=\"padding-left: 4px;\">None</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Improvement Notation: </b></th>\n <td style=\"padding-left: 4px;\">\n \n \n \n <p style=\"margin-bottom: 5px;\">\n <span>increase </span>\n </p>\n \n \n \n \n </td>\n </tr>\n \n\n \n\n </td>\n \n <tr>\n <td/>\n <td/>\n <td>Initial Population</td>\n <td>\n \n <pre><code class=\"language-cql\">//---------------------- Measure Population Definitions --------------------------------------------------//\n\n\ndefine &quot;Initial Population&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot;</code></pre>\n \n </td>\n </tr>\n \n <tr>\n <td/>\n <td/>\n <td>Denominator</td>\n <td>\n \n <pre><code class=\"language-cql\">define &quot;Denominator&quot;:\n &quot;Initial Population&quot;</code></pre>\n \n </td>\n </tr>\n \n <tr>\n <td/>\n <td/>\n <td>Denominator Exclusion</td>\n <td>\n \n <pre><code class=\"language-cql\">define &quot;Denominator Exclusions&quot;:\n &quot;Encounter with Degenerative Neurological Disorder&quot;\n union &quot;Encounter with High Risk to Airway Head Neck and Thoracic Surgery&quot;\n union &quot;Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure&quot;\n union &quot;Encounter with Neuromuscular Disorder&quot;\n union &quot;Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure&quot;\n union &quot;Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure&quot;\n union &quot;Encounter with Principal Diagnosis of Acute Respiratory Failure&quot;\n union &quot;Encounter with Diagnosis of Acute Respiratory Failure Present on Admission&quot;\n union &quot;Encounter with Tracheostomy Present on Admission&quot;\n union &quot;Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure&quot;</code></pre>\n \n </td>\n </tr>\n \n <tr>\n <td/>\n <td/>\n <td>Numerator</td>\n <td>\n \n <pre><code class=\"language-cql\">define &quot;Numerator&quot;:\n &quot;Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure&quot;\n union &quot;Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy&quot;\n union &quot;Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia&quot;\n union &quot;Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia&quot;</code></pre>\n \n </td>\n </tr>\n \n \n \n </tr>\n </table>\n \n\n <table class=\"grid-dict\">\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Elective Inpatient Encounter with Age 18 and Older without ED Visit</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">//---------------------- Supporting definitions for Measure Population Definitions --------------------------------------------------//\n\n// Note: defines that are not referenced elsewhere are at the bottom of this file.\n\n// Supports: Initial Population clause 1\n\n\n\n\ndefine &quot;Elective Inpatient Encounter with Age 18 and Older without ED Visit&quot;:\n [&quot;Encounter&quot;: &quot;Elective Inpatient Encounter&quot;] ElectiveEncounter\n where ElectiveEncounter.period ends during day of &quot;Measurement Period&quot;\n and ElectiveEncounter.priority ~ &quot;Elective (qualifier value)&quot;\n and AgeInYearsAt(date from start of ElectiveEncounter.period) &gt;= 18\n and not exists ( [&quot;Encounter&quot;: &quot;Emergency Department Visit&quot;] EDVisit\n where EDVisit.period ends 1 hour or less before or on start of ElectiveEncounter.period\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Elective Inpatient Encounter with Age and without Obstetrical Condition</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Supports: Initial Population clause 1\n\n\ndefine &quot;Elective Inpatient Encounter with Age and without Obstetrical Condition&quot;:\n &quot;Elective Inpatient Encounter with Age 18 and Older without ED Visit&quot; ElectiveEncounter\n where not exists ElectiveEncounter.diagnosis EncounterDiagnoses\n where EncounterDiagnoses.condition.getCondition ( ).code in &quot;Obstetrical or Pregnancy Related Conditions&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Elective Inpatient Encounter with OR Procedure within 3 Days</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">//---------------------- Initial Population Clauses --------------------------------------------------//\n\n// Initial Population - clause 1 - (referenced throughout the measure definitions)\n\n\n\ndefine &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot;:\n &quot;Elective Inpatient Encounter with Age and without Obstetrical Condition&quot; ElectiveEncounter\n with [&quot;Procedure&quot;: &quot;General and Neuraxial Anesthesia&quot;] SurgeryWithAnesthesia\n such that SurgeryWithAnesthesia.performed.earliest ( ) during ElectiveEncounter.hospitalizationInterval ( )\n and SurgeryWithAnesthesia.performed.earliest ( ) 3 days or less after start of ElectiveEncounter.hospitalizationInterval ( )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>General Anesthesia and MAC</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Referenced in numerator supporting clauses\n\n\ndefine &quot;General Anesthesia and MAC&quot;:\n [&quot;Procedure&quot;: &quot;Anesthesia Requiring Monitored Care&quot;] MAC\n union [&quot;Procedure&quot;: &quot;General and Neuraxial Anesthesia&quot;] GA</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Anesthesia Procedure List</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">//---------------------- End Risk Variable Accessory Functions -----------------------------//\n\n//---------------------- Utility Functions --------------------------------------------------//\n\n// Used exclusively in &quot;FirstProcedure&quot; function, below\n\n\n\n\ndefine &quot;Anesthesia Procedure List&quot;:\n [&quot;Procedure&quot;: &quot;General and Neuraxial Anesthesia&quot;] AnesthesiaProcedures\n where AnesthesiaProcedures.performed.latest ( ) during day of &quot;Measurement Period&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Intubation During General Anesthesia and MAC</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Supports: numerator clause 1\n\n\ndefine &quot;Intubation During General Anesthesia and MAC&quot;:\n from\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery,\n [&quot;Procedure&quot;: &quot;Intubation&quot;] ProceduralIntubation,\n &quot;General Anesthesia and MAC&quot; ProcedureWithAnesthesia\n where ProceduralIntubation.startsDuringAnesthesia ( ProcedureWithAnesthesia, EncounterWithSurgery )\n return ProceduralIntubation</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">//fix\n\n//---------------------- Numerator Clauses --------------------------------------------------//\n\n// Numerator - clause 1\n\n\n\n\ndefine &quot;Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure&quot;:\n from\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery,\n [&quot;Procedure&quot;: &quot;Intubation&quot;] EndotrachealTubeIn\n let IntubationInterval: EndotrachealTubeIn.interval ( ),\n LatestAnesthesiaInterval: &quot;LatestGeneralAnesthesiaOrMAC&quot;(EndotrachealTubeIn).interval ( )\n where EndotrachealTubeIn.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )\n and EndotrachealTubeIn.startsDuringHospitalization ( EncounterWithSurgery )\n and IntubationInterval starts after end of LatestAnesthesiaInterval\n and EncounterWithSurgery.isNotAtProceduralHospitalLocationDuring ( IntubationInterval )\n and not ( &quot;Intubation During General Anesthesia and MAC&quot;.id contains EndotrachealTubeIn.id )\n return EncounterWithSurgery</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Noninvasive Oxygen Therapy</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Referenced in numerator supporting clauses\n\n\ndefine &quot;Noninvasive Oxygen Therapy&quot;:\n [&quot;Procedure&quot;: &quot;Non Invasive Oxygen Therapy by Nasal Cannula or Mask&quot;]\n union [&quot;Observation&quot;: &quot;Non Invasive Oxygen Therapy&quot;]</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Numerator - clause 2\n\n\ndefine &quot;Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy&quot;:\n from\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery,\n [&quot;Procedure&quot;: &quot;Mechanical Ventilation&quot;] Ventilation,\n &quot;Noninvasive Oxygen Therapy&quot; OxygenSupport\n let VentilationInterval: Ventilation.interval ( ),\n LatestAnesthesiaInterval: &quot;LatestGeneralAnesthesiaOrMAC&quot;(Ventilation).interval ( )\n where Ventilation.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )\n and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )\n and VentilationInterval starts after end of LatestAnesthesiaInterval\n and OxygenSupport.interval ( ) starts during Interval[end of LatestAnesthesiaInterval, start of VentilationInterval]\n and EncounterWithSurgery.isNotAtProceduralHospitalLocationDuring ( VentilationInterval )\n return EncounterWithSurgery</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Extubation with Preceding Noninvasive Oxygen</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Supports: numerator clause 3\n\n\ndefine &quot;Extubation with Preceding Noninvasive Oxygen&quot;:\n from\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery,\n [&quot;Procedure&quot;: &quot;Removal of endotracheal tube (procedure)&quot;] Extubation,\n &quot;Noninvasive Oxygen Therapy&quot; OxygenSupport\n let LatestAnesthesia: &quot;LatestGeneralAnesthesiaOrMAC&quot;(Extubation)\n where Extubation.startsDuringHospitalization ( EncounterWithSurgery )\n and Extubation.startsAfterAnesthesia ( LatestAnesthesia, EncounterWithSurgery )\n and OxygenSupport.interval ( ) starts during Interval[end of LatestAnesthesia.interval ( ), start of Extubation.interval ( )]\n return Extubation</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Extubation During General Anesthesia</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Supports: numerator clause 3\n\n\ndefine &quot;Extubation During General Anesthesia&quot;:\n from\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery,\n [&quot;Procedure&quot;: &quot;Removal of endotracheal tube (procedure)&quot;] Extubation,\n &quot;General Anesthesia and MAC&quot; Anesthesia\n where Extubation.startsDuringAnesthesia ( Anesthesia, EncounterWithSurgery )\n return Extubation</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">//fix\n\n\n// Numerator - clause 3\n\n\n\ndefine &quot;Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia&quot;:\n from\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery,\n [&quot;Procedure&quot;: &quot;Removal of endotracheal tube (procedure)&quot;] Extubation\n let ExtubationInterval: Extubation.interval ( ),\n LatestAnesthesiaInterval: &quot;LatestGeneralAnesthesiaOrMAC&quot;(Extubation).interval ( )\n where Extubation.isDuringHospitalization ( EncounterWithSurgery )\n and Extubation.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )\n and ExtubationInterval starts more than 48 hours after end of LatestAnesthesiaInterval\n and not ( ( &quot;Extubation with Preceding Noninvasive Oxygen&quot;.id contains Extubation.id )\n and not ( &quot;Extubation During General Anesthesia&quot;.id contains Extubation.id )\n )\n and EncounterWithSurgery.isNotAtProceduralHospitalLocation ( )\n return EncounterWithSurgery</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Numerator - clause 4\n\n\ndefine &quot;Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia&quot;:\n from\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery,\n [&quot;Procedure&quot;: &quot;Mechanical Ventilation&quot;] Ventilation\n let VentilationInterval: Ventilation.interval ( ),\n LatestAnesthesiaInterval: &quot;LatestGeneralAnesthesiaOrMAC&quot;(Ventilation).interval ( )\n where VentilationInterval starts 48 hours or more after end of LatestAnesthesiaInterval\n and VentilationInterval starts 72 hours or less after end of LatestAnesthesiaInterval\n and Ventilation.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )\n and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )\n and not ( &quot;Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy&quot;.id contains EncounterWithSurgery.id )\n and EncounterWithSurgery.isNotAtProceduralHospitalLocation ( )\n return EncounterWithSurgery</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Numerator</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Numerator&quot;:\n &quot;Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure&quot;\n union &quot;Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy&quot;\n union &quot;Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia&quot;\n union &quot;Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Initial Population</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">//---------------------- Measure Population Definitions --------------------------------------------------//\n\n\ndefine &quot;Initial Population&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Denominator</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator&quot;:\n &quot;Initial Population&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Degenerative Neurological Disorder</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">//---------------------- Denominator Exclusion Clauses------------------------------------------------//\n\n// Denominator Exclusions - clause 1\n\n\n\ndefine &quot;Encounter with Degenerative Neurological Disorder&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery\n where exists ( EncounterWithSurgery.diagnosis EncounterDiagnosis\n where EncounterDiagnosis.condition.getCondition ( ).code in &quot;Degenerative Neurological Disorder&quot;\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with High Risk to Airway Head Neck and Thoracic Surgery</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Denominator Exclusions - clause 2\n\n\ndefine &quot;Encounter with High Risk to Airway Head Neck and Thoracic Surgery&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery\n with [&quot;Procedure&quot;: &quot;Head, Neck, and Thoracic Surgeries with High Risk Airway Compromise&quot;] HeadNeckProcedures\n such that HeadNeckProcedures.startsDuringHospitalization ( EncounterWithSurgery )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Denominator Exclusions - clause 3\n\n\ndefine &quot;Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery\n with [&quot;Procedure&quot;: &quot;Mechanical Ventilation&quot;] Ventilation\n such that Ventilation.interval ( ) starts more than 1 hour before start of FirstAnesthesiaDuringHospitalization(EncounterWithSurgery).interval ( )\n and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Neuromuscular Disorder</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Denominator Exclusions - clause 4\n\n\ndefine &quot;Encounter with Neuromuscular Disorder&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery\n where exists ( EncounterWithSurgery.diagnosis EncounterDiagnosis\n where EncounterDiagnosis.condition.getCondition ( ).code in &quot;Neuromuscular Disorder&quot;\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Denominator Exclusions - clause 5\n\n\ndefine &quot;Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure&quot;:\n from\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery,\n [&quot;Observation&quot;: &quot;Carbon Dioxide Partial Pressure in Arterial Blood&quot;] CarbonDioxide,\n [&quot;Observation&quot;: &quot;Arterial Blood pH&quot;] BloodpH\n let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery),\n FirstProcedureTime: FirstProcedure.interval ( )\n where CarbonDioxide.interval ( ) starts 48 hours or less before start of FirstProcedureTime\n and CarbonDioxide.value as Quantity &gt; 50 'mm[Hg]'\n and BloodpH.interval ( ) starts 48 hours or less before start of FirstProcedureTime\n and BloodpH.value as Quantity &lt; 7.30 '[pH]'\n and FirstProcedure is not null\n return EncounterWithSurgery</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">//fix\n\n// Denominator Exclusions - clause 6\n\n\n\ndefine &quot;Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery\n let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery)\n with [&quot;Observation&quot;: &quot;Oxygen Partial Pressure in Arterial Blood&quot;] Oxygen\n such that Oxygen.interval ( ) starts 48 hours or less before start of FirstProcedure.interval ( )\n and Oxygen.value as Quantity &lt; 50 'mm[Hg]'\n and FirstProcedure is not null\n return EncounterWithSurgery</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Principal Diagnosis of Acute Respiratory Failure</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Denominator Exclusions - clause 7\n\n\ndefine &quot;Encounter with Principal Diagnosis of Acute Respiratory Failure&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery\n where exists ( EncounterWithSurgery.diagnosis Diagnosis\n where Diagnosis.condition.getCondition ( ).code in &quot;Acute Respiratory Failure&quot;\n and Diagnosis.rank = 1\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Diagnosis of Acute Respiratory Failure Present on Admission</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Denominator Exclusions - clause 8\n\n\ndefine &quot;Encounter with Diagnosis of Acute Respiratory Failure Present on Admission&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery\n where EncounterWithSurgery.diagnosisPresentOnAdmission ( ) in &quot;Present on Admission or Clinically Undetermined&quot;\n and exists ( EncounterWithSurgery.diagnosis Diagnosis\n where Diagnosis.condition.getCondition ( ).code in &quot;Acute Respiratory Failure&quot;\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Tracheostomy Present on Admission</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">//fix\n\n// Denominator Exclusions - clause 9\n\n\n\ndefine &quot;Encounter with Tracheostomy Present on Admission&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery\n where EncounterWithSurgery.diagnosisPresentOnAdmission ( ) in &quot;Present on Admission or Clinically Undetermined&quot;\n and exists ( EncounterWithSurgery.diagnosis Dx\n where Dx.condition.getCondition ( ).code in &quot;Tracheostomy Diagnoses&quot;\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Tracheostomy Before Day of First OR Procedure</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Supports: denominator exclusions clause 10\n\n\ndefine &quot;Encounter with Tracheostomy Before Day of First OR Procedure&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery\n let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery)\n with [&quot;Procedure&quot;: &quot;Tracheostomy Procedures&quot;] TracheostomySurgery\n such that TracheostomySurgery.startsDuringHospitalization ( EncounterWithSurgery )\n and TracheostomySurgery.interval ( ) starts before day of FirstProcedure.interval ( )\n and FirstProcedure is not null</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Tracheostomy Same Day of First OR Procedure</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Supports: denominator exclusions clause 10\n\n\ndefine &quot;Encounter with Tracheostomy Same Day of First OR Procedure&quot;:\n &quot;Elective Inpatient Encounter with OR Procedure within 3 Days&quot; EncounterWithSurgery\n let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery)\n with [&quot;Procedure&quot;: &quot;Tracheostomy Procedures&quot;] TracheostomySurgery\n such that TracheostomySurgery.startsDuringHospitalization ( EncounterWithSurgery )\n and TracheostomySurgery.interval ( ) starts during day of FirstProcedure.interval ( )\n and FirstProcedure is not null</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Denominator Exclusions - clause 10\n\n\ndefine &quot;Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure&quot;:\n &quot;Encounter with Tracheostomy Before Day of First OR Procedure&quot;\n union &quot;Encounter with Tracheostomy Same Day of First OR Procedure&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>Denominator Exclusions</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator Exclusions&quot;:\n &quot;Encounter with Degenerative Neurological Disorder&quot;\n union &quot;Encounter with High Risk to Airway Head Neck and Thoracic Surgery&quot;\n union &quot;Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure&quot;\n union &quot;Encounter with Neuromuscular Disorder&quot;\n union &quot;Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure&quot;\n union &quot;Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure&quot;\n union &quot;Encounter with Principal Diagnosis of Acute Respiratory Failure&quot;\n union &quot;Encounter with Diagnosis of Acute Respiratory Failure Present on Admission&quot;\n union &quot;Encounter with Tracheostomy Present on Admission&quot;\n union &quot;Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CQMCommon</td>\n \n \n <td>getCondition</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns the Condition resource for the given reference\n*/\ndefine fluent function getCondition(reference Reference):\n singleton from ([Condition] C where C.id = reference.reference.getId())</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>QICoreCommon</td>\n \n \n <td>getId</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).\n@comment: This function can be used to determine the logical id of a given resource. It can be used in\na single-server environment to trace references. However, this function does not attempt to resolve\nor distinguish the base of the given url, and so cannot be used safely in multi-server environments.\n*/\ndefine fluent function getId(uri String):\n Last(Split(uri, '/'))</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>hospitalizationInterval</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define fluent function hospitalizationInterval(enc Encounter):\n enc.hospitalizationWithObservationAndOutpatientSurgeryService ( )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CQMCommon</td>\n \n \n <td>hospitalizationWithObservationAndOutpatientSurgeryService</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Hospitalization with Observation and Outpatient Surgery Service returns the total interval from the start of any immediately prior emergency department visit, outpatient surgery visit or observation visit to the discharge of the given encounter.\n*/\ndefine fluent function hospitalizationWithObservationAndOutpatientSurgeryService(TheEncounter &quot;Encounter&quot; ):\n TheEncounter Visit\n\t let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs\n\t\t \twhere LastObs.status = 'finished'\n and LastObs.period ends 1 hour or less on or before start of Visit.period\n\t\t\t sort by\tend of period\n \t),\n \tVisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),\n \tEDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED\n\t\t\t where LastED.status = 'finished'\n and LastED.period ends 1 hour or less on or before VisitStart\n\t\t\t sort by\tend of period\n \t),\n \tVisitStartWithED: Coalesce(start of EDVisit.period, VisitStart),\n \tOutpatientSurgeryVisit: Last([Encounter: &quot;Outpatient Surgery Service&quot;] LastSurgeryOP\n\t\t\t where LastSurgeryOP.period ends 1 hour or less on or before VisitStartWithED\n\t\t\t sort by\tend of period\n \t)\n \treturn Interval[Coalesce(start of OutpatientSurgeryVisit.period, VisitStartWithED), end of Visit.period]</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>HospitalHarm</td>\n \n \n <td>interval</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// interval\n// Given an encounter, procedure or observation resource, returns a normalized Interval object, calculated using QICoreCommon.ToInterval for the given type of resource. \n// Usage: theEncounter.interval()\n\n\ndefine fluent function interval(choice Choice&lt;Procedure,Observation,Encounter&gt;):\n case\n when choice is Procedure then QICoreCommon.ToInterval ( (choice as Procedure).performed ) \n when choice is Observation then QICoreCommon.ToInterval ( (choice as Observation).effective ) \n when choice is Encounter then QICoreCommon.ToInterval ( (choice as Encounter).period ) \n else null as Interval&lt;DateTime&gt;\n end</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>QICoreCommon</td>\n \n \n <td>ToInterval</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval\n@comment: Normalizes a choice type of DateTime, Quanitty, Interval&lt;DateTime&gt;, or Interval&lt;Quantity&gt; types\nto an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible\nrepresentations for timing-valued elements in QICore, allowing this function to be used across any resource.\nThe input can be provided as a DateTime, Quantity, Interval&lt;DateTime&gt; or Interval&lt;Quantity&gt;.\nThe intent of this function is to provide a clear and concise mechanism to treat single\nelements that have multiple possible representations as intervals so that logic doesn't have to account\nfor the variability. More complex calculations (such as medication request period or dispense period\ncalculation) need specific guidance and consideration. That guidance may make use of this function, but\nthe focus of this function is on single element calculations where the semantics are unambiguous.\nIf the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.\nIf the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,\nand the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.\nIf the input is a DateTime Interval, the result is the input.\nIf the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result\nis a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending\nimmediately before one year later than the date the patient turned the age given as the end of the quantity interval.\nIf the input is a Timing, an error will be thrown indicating that Timing calculations are not implemented. Any other input will reslt in a null DateTime Interval\n@deprecated: This function is deprecated. Use the fluent function `toInterval()` instead\n*/\ndefine function ToInterval(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;, Timing&gt;):\n case\n\t when choice is DateTime then\n \tInterval[choice as DateTime, choice as DateTime]\n\t\twhen choice is Interval&lt;DateTime&gt; then\n \t\tchoice as Interval&lt;DateTime&gt;\n\t\twhen choice is Quantity then\n\t\t Interval[Patient.birthDate + (choice as Quantity),\n\t\t\t Patient.birthDate + (choice as Quantity) + 1 year)\n\t\twhen choice is Interval&lt;Quantity&gt; then\n\t\t Interval[Patient.birthDate + (choice.low as Quantity),\n\t\t\t Patient.birthDate + (choice.high as Quantity) + 1 year)\n\t\twhen choice is Timing then\n Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval&lt;DateTime&gt;\n\t\telse\n\t\t\tnull as Interval&lt;DateTime&gt;\n\tend</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>LatestGeneralAnesthesiaOrMAC</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define function &quot;LatestGeneralAnesthesiaOrMAC&quot;(event Procedure):\n Last(&quot;General Anesthesia and MAC&quot; ProcedureList\n where ProcedureList.interval() ends before start of event.interval()\n sort by start of QICoreCommon.ToInterval(performed)\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>starts30DaysOrLessAfterFirstProcedure</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define fluent function starts30DaysOrLessAfterFirstProcedure(procedure Procedure, encounter Encounter):\n procedure.interval ( ) starts 30 days or less after end of FirstAnesthesiaDuringHospitalization(encounter).interval ( )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>FirstAnesthesiaDuringHospitalization</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// Returns the first anesthesia procedure that starts during the hospitalization encounter.\n\n\ndefine function &quot;FirstAnesthesiaDuringHospitalization&quot;(QualifyingEncounter Encounter):\n First(&quot;Anesthesia Procedure List&quot; anesthesia\n where anesthesia.startsDuringHospitalization(QualifyingEncounter)\n sort by start of performed\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>HospitalHarm</td>\n \n \n <td>startsDuringHospitalization</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// startsDuringHospitalization\n// Given an encounter, returns true if the calling observation effective time or procedure performed starts during that encounter. \n// The interval of the encounter is\n// determined by calling the CQCommon function 'HospitalizationWithObservationAndOutpatientSurgeryService'wth the encounter as the argument.\n// Usage: theObservation.startsDuringHospitalization(anEncounter)\n\n\ndefine fluent function startsDuringHospitalization(choice Choice&lt;Procedure,Observation&gt;, enc Encounter):\n case\n when choice is Procedure then QICoreCommon.ToInterval ( (choice as Procedure).performed ) starts during CQMCommon.&quot;HospitalizationWithObservationAndOutpatientSurgeryService&quot; ( enc )\n when choice is Observation then QICoreCommon.ToInterval ( (choice as Observation).effective ) starts during CQMCommon.&quot;HospitalizationWithObservationAndOutpatientSurgeryService&quot; ( enc )\nelse false\n end</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CQMCommon</td>\n \n \n <td>HospitalizationWithObservationAndOutpatientSurgeryService</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Hospitalization with Observation and Outpatient Surgery Service returns the total interval from the start of any immediately prior emergency department visit, outpatient surgery visit or observation visit to the discharge of the given encounter.\n@deprecated: This function is deprecated. Use the fluent function `hospitalizationWithObservationAndOutpatientSurgeryService()` instead.\n*/\ndefine function &quot;HospitalizationWithObservationAndOutpatientSurgeryService&quot;(TheEncounter &quot;Encounter&quot; ):\n TheEncounter Visit\n\t let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs\n\t\t \twhere LastObs.status = 'finished'\n and LastObs.period ends 1 hour or less on or before start of Visit.period\n\t\t\t sort by\tend of period\n \t),\n \tVisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),\n \tEDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED\n\t\t\t where LastED.status = 'finished'\n and LastED.period ends 1 hour or less on or before VisitStart\n\t\t\t sort by\tend of period\n \t),\n \tVisitStartWithED: Coalesce(start of EDVisit.period, VisitStart),\n \tOutpatientSurgeryVisit: Last([Encounter: &quot;Outpatient Surgery Service&quot;] LastSurgeryOP\n\t\t\t where LastSurgeryOP.period ends 1 hour or less on or before VisitStartWithED\n\t\t\t sort by\tend of period\n \t)\n \treturn Interval[Coalesce(start of OutpatientSurgeryVisit.period, VisitStartWithED), end of Visit.period]</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>isNotAtProceduralHospitalLocationDuring</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define fluent function isNotAtProceduralHospitalLocationDuring(encounter Encounter, intrvl Interval&lt;DateTime&gt;):\n ( not exists ( encounter.location EncounterLocation\n where EncounterLocation.location.type in &quot;Procedural Hospital Locations&quot;\n and EncounterLocation.period starts during intrvl\n )\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>startsDuringAnesthesia</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// and procedure.startsDuringHospitalization(EncounterWithSurgery)\n\n\ndefine fluent function startsDuringAnesthesia(procedure Procedure, anesthesia Procedure, encounterWithSurgery Encounter):\n procedure.interval ( ) starts during anesthesia.interval ( )\n and procedure.startsDuringHospitalization ( encounterWithSurgery )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>HospitalHarm</td>\n \n \n <td>isDuringHospitalization</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// isDuringHospitalization\n// Given an encounter, returns true if the calling observation effective time or procedure performed occurs during that encounter. \n// The interval of the encounter is\n// determined by calling the CQCommon function 'HospitalizationWithObservationAndOutpatientSurgeryService'wth the encounter as the argument.\n// Usage: theProcedure.isDuringHospitalization(anEncounter)\n\n\ndefine fluent function isDuringHospitalization(choice Choice&lt;Procedure,Observation&gt;, enc Encounter):\n case\n when choice is Procedure then \n QICoreCommon.ToInterval ( (choice as Procedure).performed ) during CQMCommon.&quot;HospitalizationWithObservationAndOutpatientSurgeryService&quot; ( enc )\n when choice is Observation then \n QICoreCommon.ToInterval ((choice as Observation).effective ) during CQMCommon.&quot;HospitalizationWithObservationAndOutpatientSurgeryService&quot; ( enc )\nelse false\n end</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>startsAfterAnesthesia</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define fluent function startsAfterAnesthesia(procedure Procedure, anesthesia Procedure, encounterWithSurgery Encounter):\n procedure.interval ( ) starts after anesthesia.interval ( )\n and procedure.startsDuringHospitalization ( encounterWithSurgery )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS1218HHRFFHIR</td>\n \n \n <td>isNotAtProceduralHospitalLocation</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define fluent function isNotAtProceduralHospitalLocation(encounter Encounter):\n ( not exists ( encounter.location EncounterLocation\n where EncounterLocation.location.type in &quot;Procedural Hospital Locations&quot;\n )\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>HospitalHarm</td>\n \n \n <td>diagnosisPresentOnAdmission</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">// diagnosisPresentOnAdmission\n// Given an Encounter, this function returns the Present On Admission code of encounter's diagnosis, if present. Returns null otherwiese. \n// Usage: anEncouner.diagnosisPresentOnAdmission()\n\ndefine fluent function diagnosisPresentOnAdmission(enc Encounter):\n (singleton from (\n enc.diagnosis.extension E where E.url = 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter-diagnosisPresentOnAdmission'\n )).value as Concept</code></pre>\n </td>\n \n </tr>\n \n </table>\n </td>\n </tr>\n \n \n \n\n </table>\n</div>"
      },
      "contained" : [
        {
          "resourceType" : "Library",
          "id" : "effective-data-requirements",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
              "valueCoding" : {
                "system" : "http://snomed.info/sct",
                "code" : "103390000",
                "display" : "Elective (qualifier value)"
              }
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
              "valueCoding" : {
                "system" : "http://snomed.info/sct",
                "code" : "271280005",
                "display" : "Removal of endotracheal tube (procedure)"
              }
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Elective Inpatient Encounter with Age 18 and Older without ED Visit"
                },
                {
                  "url" : "statement",
                  "valueString" : "//---------------------- Supporting definitions for Measure Population Definitions --------------------------------------------------//\n\n// Note: defines that are not referenced elsewhere are at the bottom of this file.\n\n// Supports: Initial Population clause 1\n\n\n\n\ndefine \"Elective Inpatient Encounter with Age 18 and Older without ED Visit\":\n [\"Encounter\": \"Elective Inpatient Encounter\"] ElectiveEncounter\n where ElectiveEncounter.period ends during day of \"Measurement Period\"\n and ElectiveEncounter.priority ~ \"Elective (qualifier value)\"\n and AgeInYearsAt(date from start of ElectiveEncounter.period) >= 18\n and not exists ( [\"Encounter\": \"Emergency Department Visit\"] EDVisit\n where EDVisit.period ends 1 hour or less before or on start of ElectiveEncounter.period\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 0
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Elective Inpatient Encounter with Age and without Obstetrical Condition"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Supports: Initial Population clause 1\n\n\ndefine \"Elective Inpatient Encounter with Age and without Obstetrical Condition\":\n \"Elective Inpatient Encounter with Age 18 and Older without ED Visit\" ElectiveEncounter\n where not exists ElectiveEncounter.diagnosis EncounterDiagnoses\n where EncounterDiagnoses.condition.getCondition ( ).code in \"Obstetrical or Pregnancy Related Conditions\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 1
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Elective Inpatient Encounter with OR Procedure within 3 Days"
                },
                {
                  "url" : "statement",
                  "valueString" : "//---------------------- Initial Population Clauses --------------------------------------------------//\n\n// Initial Population - clause 1 - (referenced throughout the measure definitions)\n\n\n\ndefine \"Elective Inpatient Encounter with OR Procedure within 3 Days\":\n \"Elective Inpatient Encounter with Age and without Obstetrical Condition\" ElectiveEncounter\n with [\"Procedure\": \"General and Neuraxial Anesthesia\"] SurgeryWithAnesthesia\n such that SurgeryWithAnesthesia.performed.earliest ( ) during ElectiveEncounter.hospitalizationInterval ( )\n and SurgeryWithAnesthesia.performed.earliest ( ) 3 days or less after start of ElectiveEncounter.hospitalizationInterval ( )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 2
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "General Anesthesia and MAC"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Referenced in numerator supporting clauses\n\n\ndefine \"General Anesthesia and MAC\":\n [\"Procedure\": \"Anesthesia Requiring Monitored Care\"] MAC\n union [\"Procedure\": \"General and Neuraxial Anesthesia\"] GA"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 3
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Anesthesia Procedure List"
                },
                {
                  "url" : "statement",
                  "valueString" : "//---------------------- End Risk Variable Accessory Functions -----------------------------//\n\n//---------------------- Utility Functions --------------------------------------------------//\n\n// Used exclusively in \"FirstProcedure\" function, below\n\n\n\n\ndefine \"Anesthesia Procedure List\":\n [\"Procedure\": \"General and Neuraxial Anesthesia\"] AnesthesiaProcedures\n where AnesthesiaProcedures.performed.latest ( ) during day of \"Measurement Period\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 4
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Intubation During General Anesthesia and MAC"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Supports: numerator clause 1\n\n\ndefine \"Intubation During General Anesthesia and MAC\":\n from\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery,\n [\"Procedure\": \"Intubation\"] ProceduralIntubation,\n \"General Anesthesia and MAC\" ProcedureWithAnesthesia\n where ProceduralIntubation.startsDuringAnesthesia ( ProcedureWithAnesthesia, EncounterWithSurgery )\n return ProceduralIntubation"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 5
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure"
                },
                {
                  "url" : "statement",
                  "valueString" : "//fix\n\n//---------------------- Numerator Clauses --------------------------------------------------//\n\n// Numerator - clause 1\n\n\n\n\ndefine \"Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure\":\n from\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery,\n [\"Procedure\": \"Intubation\"] EndotrachealTubeIn\n let IntubationInterval: EndotrachealTubeIn.interval ( ),\n LatestAnesthesiaInterval: \"LatestGeneralAnesthesiaOrMAC\"(EndotrachealTubeIn).interval ( )\n where EndotrachealTubeIn.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )\n and EndotrachealTubeIn.startsDuringHospitalization ( EncounterWithSurgery )\n and IntubationInterval starts after end of LatestAnesthesiaInterval\n and EncounterWithSurgery.isNotAtProceduralHospitalLocationDuring ( IntubationInterval )\n and not ( \"Intubation During General Anesthesia and MAC\".id contains EndotrachealTubeIn.id )\n return EncounterWithSurgery"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 6
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Noninvasive Oxygen Therapy"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Referenced in numerator supporting clauses\n\n\ndefine \"Noninvasive Oxygen Therapy\":\n [\"Procedure\": \"Non Invasive Oxygen Therapy by Nasal Cannula or Mask\"]\n union [\"Observation\": \"Non Invasive Oxygen Therapy\"]"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 7
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Numerator - clause 2\n\n\ndefine \"Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy\":\n from\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery,\n [\"Procedure\": \"Mechanical Ventilation\"] Ventilation,\n \"Noninvasive Oxygen Therapy\" OxygenSupport\n let VentilationInterval: Ventilation.interval ( ),\n LatestAnesthesiaInterval: \"LatestGeneralAnesthesiaOrMAC\"(Ventilation).interval ( )\n where Ventilation.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )\n and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )\n and VentilationInterval starts after end of LatestAnesthesiaInterval\n and OxygenSupport.interval ( ) starts during Interval[end of LatestAnesthesiaInterval, start of VentilationInterval]\n and EncounterWithSurgery.isNotAtProceduralHospitalLocationDuring ( VentilationInterval )\n return EncounterWithSurgery"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 8
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Extubation with Preceding Noninvasive Oxygen"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Supports: numerator clause 3\n\n\ndefine \"Extubation with Preceding Noninvasive Oxygen\":\n from\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery,\n [\"Procedure\": \"Removal of endotracheal tube (procedure)\"] Extubation,\n \"Noninvasive Oxygen Therapy\" OxygenSupport\n let LatestAnesthesia: \"LatestGeneralAnesthesiaOrMAC\"(Extubation)\n where Extubation.startsDuringHospitalization ( EncounterWithSurgery )\n and Extubation.startsAfterAnesthesia ( LatestAnesthesia, EncounterWithSurgery )\n and OxygenSupport.interval ( ) starts during Interval[end of LatestAnesthesia.interval ( ), start of Extubation.interval ( )]\n return Extubation"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 9
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Extubation During General Anesthesia"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Supports: numerator clause 3\n\n\ndefine \"Extubation During General Anesthesia\":\n from\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery,\n [\"Procedure\": \"Removal of endotracheal tube (procedure)\"] Extubation,\n \"General Anesthesia and MAC\" Anesthesia\n where Extubation.startsDuringAnesthesia ( Anesthesia, EncounterWithSurgery )\n return Extubation"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 10
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia"
                },
                {
                  "url" : "statement",
                  "valueString" : "//fix\n\n\n// Numerator - clause 3\n\n\n\ndefine \"Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia\":\n from\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery,\n [\"Procedure\": \"Removal of endotracheal tube (procedure)\"] Extubation\n let ExtubationInterval: Extubation.interval ( ),\n LatestAnesthesiaInterval: \"LatestGeneralAnesthesiaOrMAC\"(Extubation).interval ( )\n where Extubation.isDuringHospitalization ( EncounterWithSurgery )\n and Extubation.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )\n and ExtubationInterval starts more than 48 hours after end of LatestAnesthesiaInterval\n and not ( ( \"Extubation with Preceding Noninvasive Oxygen\".id contains Extubation.id )\n and not ( \"Extubation During General Anesthesia\".id contains Extubation.id )\n )\n and EncounterWithSurgery.isNotAtProceduralHospitalLocation ( )\n return EncounterWithSurgery"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 11
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Numerator - clause 4\n\n\ndefine \"Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia\":\n from\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery,\n [\"Procedure\": \"Mechanical Ventilation\"] Ventilation\n let VentilationInterval: Ventilation.interval ( ),\n LatestAnesthesiaInterval: \"LatestGeneralAnesthesiaOrMAC\"(Ventilation).interval ( )\n where VentilationInterval starts 48 hours or more after end of LatestAnesthesiaInterval\n and VentilationInterval starts 72 hours or less after end of LatestAnesthesiaInterval\n and Ventilation.starts30DaysOrLessAfterFirstProcedure ( EncounterWithSurgery )\n and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )\n and not ( \"Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy\".id contains EncounterWithSurgery.id )\n and EncounterWithSurgery.isNotAtProceduralHospitalLocation ( )\n return EncounterWithSurgery"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 12
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Numerator"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Numerator\":\n \"Encounter with Intubation Outside of Procedural Area within 30 Days of End of First OR Procedure\"\n union \"Encounter with Mechanical Ventilation Outside of Procedural Area within 30 Days of End of First OR Procedure and Preceded by Non Invasive Oxygen Therapy\"\n union \"Encounter with Extubation Outside of Procedural Area within 30 Days of End of First OR Procedure More Than 48 Hours After End of Anesthesia\"\n union \"Encounter with Mechanical Ventilation within 30 Days of End of First OR Procedure and Between 48 and 72 Hours After End of OR Procedure and not Preceded by Non Invasive Oxygen Therapy or Anesthesia\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 13
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Initial Population"
                },
                {
                  "url" : "statement",
                  "valueString" : "//---------------------- Measure Population Definitions --------------------------------------------------//\n\n\ndefine \"Initial Population\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 14
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Denominator"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Denominator\":\n \"Initial Population\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 15
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Degenerative Neurological Disorder"
                },
                {
                  "url" : "statement",
                  "valueString" : "//---------------------- Denominator Exclusion Clauses------------------------------------------------//\n\n// Denominator Exclusions - clause 1\n\n\n\ndefine \"Encounter with Degenerative Neurological Disorder\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery\n where exists ( EncounterWithSurgery.diagnosis EncounterDiagnosis\n where EncounterDiagnosis.condition.getCondition ( ).code in \"Degenerative Neurological Disorder\"\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 16
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with High Risk to Airway Head Neck and Thoracic Surgery"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Denominator Exclusions - clause 2\n\n\ndefine \"Encounter with High Risk to Airway Head Neck and Thoracic Surgery\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery\n with [\"Procedure\": \"Head, Neck, and Thoracic Surgeries with High Risk Airway Compromise\"] HeadNeckProcedures\n such that HeadNeckProcedures.startsDuringHospitalization ( EncounterWithSurgery )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 17
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Denominator Exclusions - clause 3\n\n\ndefine \"Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery\n with [\"Procedure\": \"Mechanical Ventilation\"] Ventilation\n such that Ventilation.interval ( ) starts more than 1 hour before start of FirstAnesthesiaDuringHospitalization(EncounterWithSurgery).interval ( )\n and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 18
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Neuromuscular Disorder"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Denominator Exclusions - clause 4\n\n\ndefine \"Encounter with Neuromuscular Disorder\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery\n where exists ( EncounterWithSurgery.diagnosis EncounterDiagnosis\n where EncounterDiagnosis.condition.getCondition ( ).code in \"Neuromuscular Disorder\"\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 19
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Denominator Exclusions - clause 5\n\n\ndefine \"Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure\":\n from\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery,\n [\"Observation\": \"Carbon Dioxide Partial Pressure in Arterial Blood\"] CarbonDioxide,\n [\"Observation\": \"Arterial Blood pH\"] BloodpH\n let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery),\n FirstProcedureTime: FirstProcedure.interval ( )\n where CarbonDioxide.interval ( ) starts 48 hours or less before start of FirstProcedureTime\n and CarbonDioxide.value as Quantity > 50 'mm[Hg]'\n and BloodpH.interval ( ) starts 48 hours or less before start of FirstProcedureTime\n and BloodpH.value as Quantity < 7.30 '[pH]'\n and FirstProcedure is not null\n return EncounterWithSurgery"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 20
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure"
                },
                {
                  "url" : "statement",
                  "valueString" : "//fix\n\n// Denominator Exclusions - clause 6\n\n\n\ndefine \"Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery\n let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery)\n with [\"Observation\": \"Oxygen Partial Pressure in Arterial Blood\"] Oxygen\n such that Oxygen.interval ( ) starts 48 hours or less before start of FirstProcedure.interval ( )\n and Oxygen.value as Quantity < 50 'mm[Hg]'\n and FirstProcedure is not null\n return EncounterWithSurgery"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 21
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Principal Diagnosis of Acute Respiratory Failure"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Denominator Exclusions - clause 7\n\n\ndefine \"Encounter with Principal Diagnosis of Acute Respiratory Failure\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery\n where exists ( EncounterWithSurgery.diagnosis Diagnosis\n where Diagnosis.condition.getCondition ( ).code in \"Acute Respiratory Failure\"\n and Diagnosis.rank = 1\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 22
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Diagnosis of Acute Respiratory Failure Present on Admission"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Denominator Exclusions - clause 8\n\n\ndefine \"Encounter with Diagnosis of Acute Respiratory Failure Present on Admission\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery\n where EncounterWithSurgery.diagnosisPresentOnAdmission ( ) in \"Present on Admission or Clinically Undetermined\"\n and exists ( EncounterWithSurgery.diagnosis Diagnosis\n where Diagnosis.condition.getCondition ( ).code in \"Acute Respiratory Failure\"\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 23
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Tracheostomy Present on Admission"
                },
                {
                  "url" : "statement",
                  "valueString" : "//fix\n\n// Denominator Exclusions - clause 9\n\n\n\ndefine \"Encounter with Tracheostomy Present on Admission\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery\n where EncounterWithSurgery.diagnosisPresentOnAdmission ( ) in \"Present on Admission or Clinically Undetermined\"\n and exists ( EncounterWithSurgery.diagnosis Dx\n where Dx.condition.getCondition ( ).code in \"Tracheostomy Diagnoses\"\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 24
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Tracheostomy Before Day of First OR Procedure"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Supports: denominator exclusions clause 10\n\n\ndefine \"Encounter with Tracheostomy Before Day of First OR Procedure\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery\n let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery)\n with [\"Procedure\": \"Tracheostomy Procedures\"] TracheostomySurgery\n such that TracheostomySurgery.startsDuringHospitalization ( EncounterWithSurgery )\n and TracheostomySurgery.interval ( ) starts before day of FirstProcedure.interval ( )\n and FirstProcedure is not null"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 25
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Tracheostomy Same Day of First OR Procedure"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Supports: denominator exclusions clause 10\n\n\ndefine \"Encounter with Tracheostomy Same Day of First OR Procedure\":\n \"Elective Inpatient Encounter with OR Procedure within 3 Days\" EncounterWithSurgery\n let FirstProcedure: FirstAnesthesiaDuringHospitalization(EncounterWithSurgery)\n with [\"Procedure\": \"Tracheostomy Procedures\"] TracheostomySurgery\n such that TracheostomySurgery.startsDuringHospitalization ( EncounterWithSurgery )\n and TracheostomySurgery.interval ( ) starts during day of FirstProcedure.interval ( )\n and FirstProcedure is not null"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 26
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure"
                },
                {
                  "url" : "statement",
                  "valueString" : "// Denominator Exclusions - clause 10\n\n\ndefine \"Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure\":\n \"Encounter with Tracheostomy Before Day of First OR Procedure\"\n union \"Encounter with Tracheostomy Same Day of First OR Procedure\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 27
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS1218HHRFFHIR"
                },
                {
                  "url" : "name",
                  "valueString" : "Denominator Exclusions"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Denominator Exclusions\":\n \"Encounter with Degenerative Neurological Disorder\"\n union \"Encounter with High Risk to Airway Head Neck and Thoracic Surgery\"\n union \"Encounter with Mechanical Ventilation that Starts More than One Hour Prior to Start of First OR Procedure\"\n union \"Encounter with Neuromuscular Disorder\"\n union \"Encounter with PaCO2 Greater Than 50 and Arterial pH Less Than 7.30 within 48 Hours Prior to Start of First OR Procedure\"\n union \"Encounter with PaO2 Less Than 50 within 48 Hours Prior to Start of First OR Procedure\"\n union \"Encounter with Principal Diagnosis of Acute Respiratory Failure\"\n union \"Encounter with Diagnosis of Acute Respiratory Failure Present on Admission\"\n union \"Encounter with Tracheostomy Present on Admission\"\n union \"Encounter with Tracheostomy Prior to or on the Same Day of First OR Procedure\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 28
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CQMCommon"
                },
                {
                  "url" : "name",
                  "valueString" : "getConditio    ]
                  }
                }
              ]
            },
            {
              "type" : "Condition",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"
              ],
              "mustSupport" : [
                "id",
                "id.value"
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code",
                "id",
                "id.value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.255"
                }
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code",
                "performed",
                "id",
                "id.value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208"
                }
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code",
                "performed",
                "id",
                "id.value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208"
                }
              ],
              "dateFilter" : [
                {
                  "path" : "performed",
                  "valuePeriod" : {
                    "extension" : [
                      {
                        "url" : "http://hl7.org/fhir/StructureDefinition/cqf-expression",
                        "valueExpression" : {
                          "language" : "text/cql-identifier",
                          "expression" : "Measurement Period"
                        }
                      }
                    ]
                  }
                }
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code",
                "id",
                "id.value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.179"
                }
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code",
                "id",
                "id.value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.209"
                }
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code",
                "id",
                "id.value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "code" : [
                    {
                      "system" : "http://snomed.info/sct",
                      "code" : "271280005",
                      "display" : "Removal of endotracheal tube (procedure)"
                    }
                  ]
                }
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code",
                "id",
                "id.value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.251"
                }
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code",
                "id",
                "id.value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.107"
                }
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code",
                "id",
                "id.value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.181"
                }
              ]
            },
            {
              "type" : "Observation",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"
              ],
              "mustSupport" : [
                "code"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.213"
                }
              ]
            },
            {
              "type" : "Observation",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"
              ],
              "mustSupport" : [
                "code",
                "value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.95"
                }
              ]
            },
            {
              "type" : "Observation",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"
              ],
              "mustSupport" : [
                "code",
                "value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.96"
                }
              ]
            },
            {
              "type" : "Observation",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"
              ],
              "mustSupport" : [
                "code",
                "value"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.94"
                }
              ]
            }
          ]
        }
      ],
      "extension" : [
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
          "valueReference" : {
            "reference" : "Device/cqf-tooling"
          }
        },
        {
          "id" : "effective-data-requirements",
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements",
          "valueReference" : {
            "reference" : "#effective-data-requirements"
          }
        }
      ],
      "url" : "https://madie.cms.gov/Measure/CMS1218HHRFFHIR",
      "identifier" : [
        {
          "use" : "usual",
          "type" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
                "code" : "short-name",
                "display" : "Short Name"
              }
            ]
          },
          "system" : "https://madie.cms.gov/measure/shortName",
          "value" : "CMS1218FHIR"
        },
        {
          "use" : "official",
          "type" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
                "code" : "version-independent",
                "display" : "Version Independent"
              }
            ]
          },
          "system" : "urn:ietf:rfc:3986",
          "value" : "urn:uuid:b6857e46-6412-432d-abc8-0508efc0d2d7"
        },
        {
          "use" : "official",
          "type" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
                "code" : "version-specific",
                "display" : "Version Specific"
              }
            ]
          },
          "system" : "urn:ietf:rfc:3986",
          "value" : "urn:uuid:447f5c0f-f39c-4a27-a0bc-d5ae918bef10"
        },
        {
          "use" : "official",
          "type" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
                "code" : "endorser",
                "display" : "Endorser"
              }
            ]
          },
          "system" : "https://madie.cms.gov/measure/cbeId",
          "value" : "4130e",
          "assigner" : {
            "display" : "CMS Consensus Based Entity"
          }
        },
        {
          "use" : "official",
          "type" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
                "code" : "publisher",
                "display" : "Publisher"
              }
            ]
          },
          "system" : "https://madie.cms.gov/measure/cmsId",
          "value" : "1218FHIR",
          "assigner" : {
            "display" : "CMS"
          }
        }
      ],
      "version" : "0.0.003",
      "name" : "CMS1218HHRFFHIR",
      "title" : "Hospital Harm - Postoperative Respiratory FailureFHIR",
      "status" : "active",
      "experimental" : false,
      "date" : "2025-01-14T15:54:07+00:00",
      "publisher" : "Centers for Medicare & Medicaid Services (CMS)",
      "contact" : [
        {
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://www.cms.gov/"
            }
          ]
        }
      ],
      "description" : "This measure assesses the number of elective inpatient hospitalizations for patients aged 18 years and older without an obstetrical condition who have a procedure resulting in postoperative respiratory failure (PRF)",
      "purpose" : "UNKNOWN",
      "usage" : "PRF is evaluated using mechanical ventilation (MV) documentation or intubation and extubation documentation to allow for hospital documentation variances. Therefore, if MV documentation is not available, intubation and extubation can serve as a proxy for determining if MV occurred and its duration. To determine that an unplanned initiation of MV occurred, the logic looks for evidence of a non-invasive oxygen therapy assessment such as oxygen via 'nasal canula' or 'breathing room air' prior to the MV occurrence to verify that MV was newly initiated. Additionally, facility location codes are used to determine if MV was initiated outside of a procedural area (e.g., medical floor). Conversely, to determine MV duration, the logic looks for evidence that a non-invasive oxygen therapy assessment or another operating room procedure does not exist prior to the MV occurrence to verify that MV was continued without interruption from a procedural area. \n\t\nThis eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.\n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS1218v2. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).",
      "copyright" : "Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. \n\nThis material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.",
      "effectivePeriod" : {
        "start" : "2026-01-01",
        "end" : "2026-12-31"
      },
      "author" : [
        {
          "name" : "Mathematica",
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://www.mathematica.org/"
            }
          ]
        }
      ],
      "library" : [
        "https://madie.cms.gov/Library/CMS1218HHRFFHIR"
      ],
      "disclaimer" : "This performance measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications. \n\nTHE MEASURES AND SPECIFICATIONS ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND. \n\nDue to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].",
      "rationale" : "Postoperative respiratory failure (PRF), defined as unplanned endotracheal reintubation, prolonged inability to wean from mechanical ventilation, or inadequate oxygenation and/or ventilation, is the most common serious postoperative pulmonary complication, with an incidence of up to 7.5% (the incidence of any postoperative pulmonary complication ranges from 10-40%) (Arozullah et al., 2000; Canet et al., 2015; Gupta et al., 2011; Kor et al., 2014). This measure addresses the prevalence of PRF and the variance between hospitals in the incidence of PRF. PRF is a serious complication that can increase the risk of morbidity and mortality, with in-hospital mortality resulting from PRF estimated at 25% to 40% (Arozullah et al., 2000; Canet & Gallart, 2014). Surgical procedures complicated by PRF have 3.74 times higher adjusted odds of death than those not complicated by respiratory failure, 1.47 times higher odds of 90-day readmission, and 1.86 times higher odds of an outpatient visit with one of 44 postoperative conditions (e.g., bacterial infection, fluid and electrolyte disorder, abdominal hernia) within 90 days of hospital discharge (Miller et al., 2001; Romano et al, 2009). PRF is additionally associated with prolonged mechanical ventilation and the need for rehabilitation or skilled nursing facility placement upon discharge (Thompson & Lisco, 2018).\n\nThe incidence of PRF varies by hospital, with higher reported rates of PRF in nonteaching hospitals than teaching hospitals (Rahman et al., 2013). Additionally, one study found that the odds of developing PRF increased by 6% for each level increase in hospital size from small to large (Rahman et al., 2013). This suggests that there remains room for improvement in hospitals reporting higher rates of PRF.\n\nThe most widely used current measures of PRF are based on either claims data (CMS Patient Safety Indicator (PSI) 11) or proprietary registry data (National Surgical Quality Improvement Program (NSQIP) of the American College of Surgeons). The eCQM is closely modeled after the NSQIP measure of PRF, which has been widely adopted across American hospitals, and is intended to complement and eventually supplant CMS PSI 11.",
      "clinicalRecommendationStatement" : "Recent studies and current clinical practice guidelines for PRF have identified enhanced recovery pathways, prophylactic mucolytics, postoperative continuous positive airway pressure ventilation, lung protective intraoperative ventilation, prophylactic respiratory physiotherapy, epidural analgesia, and goal directed hemodynamic therapy as evidence-based interventions to reduce the incidence of PRF. Yet, progress in reducing the incidence of PRF has been stymied by lack of consensus regarding the definition of PRF, which patients are most at-risk, which risk factors are potentially modifiable, and which patients are more likely to benefit from targeted interventions of a health care system’s limited resources. This measure would address this gap in data.\n\nRelevant clinical guidelines for preventing postoperative respiratory failure can be found in the following:\n\n- Mohanty, et al. Optimal Perioperative Management of the Geriatric Patient: Best Practices Guideline from ACS NSQIP/AGS, 2016\n- Piraino, et al. AARC Clinical Practice Guideline: Management of Adult Patients with Oxygen in the Acute Care Setting, 2022",
      "guidance" : "PRF is evaluated using mechanical ventilation (MV) documentation or intubation and extubation documentation to allow for hospital documentation variances. Therefore, if MV documentation is not available, intubation and extubation can serve as a proxy for determining if MV occurred and its duration. To determine that an unplanned initiation of MV occurred, the logic looks for evidence of a non-invasive oxygen therapy assessment such as oxygen via 'nasal canula' or 'breathing room air' prior to the MV occurrence to verify that MV was newly initiated. Additionally, facility location codes are used to determine if MV was initiated outside of a procedural area (e.g., medical floor). Conversely, to determine MV duration, the logic looks for evidence that a non-invasive oxygen therapy assessment or another operating room procedure does not exist prior to the MV occurrence to verify that MV was continued without interruption from a procedural area. \n\t\nThis eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.\n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS1218v2. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).",
      "group" : [
        {
          "id" : "67520e47670f1c0879cef598",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-scoring",
                    "code" : "proportion",
                    "display" : "Proportion"
                  }
                ]
              }
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
              "valueCode" : "Encounter"
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-type",
                    "code" : "outcome",
                    "display" : "Outcome"
                  }
                ]
              }
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation",
              "valueCode" : "None"
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
                    "code" : "decrease",
                    "display" : "increase"
                  }
                ]
              }
            }
          ],
          "population" : [
            {
              "id" : "EBD61368-EDA1-4A7F-B134-48A501C47028",
              "code" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "initial-population",
                    "display" : "Initial Population"
                  }
                ]
              },
              "description" : "Elective inpatient hospitalizations with no preceding emergency department visit that end during the measurement period for patients aged 18 and older without an obstetrical condition and at least one surgical procedure was performed within the first 3 days of the encounter",
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Initial Population"
              }
            },
            {
              "id" : "A15EB430-6645-42AC-8FCE-0FF0BF0B4749",
              "code" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "denominator",
                    "display" : "Denominator"
                  }
                ]
              },
              "description" : "Equals Initial Population",
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Denominator"
              }
            },
            {
              "id" : "1389AFF6-741D-47CB-BED0-62D858980EE4",
              "code" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "denominator-exclusion",
                    "display" : "Denominator Exclusion"
                  }
                ]
              },
              "description" : "Inpatient hospitalizations for patients:\n\nWith a diagnosis for a degenerative neurological disorder\n\nWith any selected head, neck, and thoracic surgery involving significant risk of airway compromise or requiring airway protection\n\nWho have mechanical ventilation that starts more than one hour prior to the start of the first operating room (OR) procedure\n\nWith a diagnosis for a neuromuscular disorder\n\nWith arterial partial pressure of carbon dioxide (PaCO2)>50 mmHg combined with an arterial pH<7.30 within 48 hours or less prior to the start of the first OR procedure\n\nWith arterial partial pressure of oxygen (PaO2)<50 mmHg within 48 hours or less prior to the start of the first OR procedure\n\nWith a principal diagnosis for acute respiratory failure\n\nWith a diagnosis for acute respiratory failure present on admission\n\nWith any diagnosis present on admission for the existence of a tracheostomy\n\nWhere a tracheostomy is performed before or on the same day as the first OR procedure",
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Denominator Exclusions"
              }
            },
            {
              "id" : "F1D273B8-1513-4C6E-B65F-22FD939174E6",
              "code" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "numerator",
                    "display" : "Numerator"
                  }
                ]
              },
              "description" : "Elective inpatient hospitalizations for patients with postoperative respiratory failure as evidenced by any of the following:\n\nCriterion A: Mechanical ventilation (MV) initiated within 30 days after first OR procedure, as evidenced by:\n\nA.1. Intubation that occurs outside of a procedural area and within 30 days after the end of the/first OR procedure of the encounter.\n\nor\n\nA.2. MV that occurs outside of a procedural area within 30 days after the end of the first OR procedure of the encounter and is preceded by a period of non-invasive oxygen therapy between the end of the OR procedure and the MV occurrence, and without a subsequent OR procedure between the non-invasive oxygen therapy and the MV occurrence.\n\nor\n\nCriterion B: MV with a duration of more than 48 hours after the first OR procedure, as evidenced by:\n\nB.1. Extubation that occurs outside of a procedural area more than 48 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a period of non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the extubation occurrence.\n\nor\n\nB.2 Mechanical ventilation that occurs between 48 and 72 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the MV occurrence./",
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Numerator"
              }
            }
          ]
        }
      ]
    }

    XIG built as of ??metadata-date??. Found ??metadata-resources?? resources in ??metadata-packages?? packages.